├── .gitignore ├── .idea └── .idea.Unity-Monads │ └── .idea │ ├── .gitignore │ ├── encodings.xml │ ├── indexLayout.xml │ └── vcs.xml ├── Assembly-CSharp-Editor.csproj.DotSettings ├── Assembly-CSharp.csproj.DotSettings ├── Assets ├── CompilerServices.cs ├── DefaultVolumeProfile.asset ├── Editor │ ├── GameAreaEditor.cs │ └── LevelSystemEditor.cs ├── Examples │ ├── GarbageTest.cs │ ├── Info.cs │ ├── LootSpawnInfo.cs │ ├── Messages │ │ ├── FailureTypes.cs │ │ ├── GameMessages.cs │ │ ├── LootMessages.cs │ │ ├── ObstacleMessages.cs │ │ ├── TargetMessages.cs │ │ └── UnitMessages.cs │ ├── Obstacle.cs │ ├── Pickup.cs │ ├── PlayerController.cs │ ├── SO │ │ ├── GameArea.cs │ │ └── GameAreaVisualizer.cs │ ├── SimpleTests.cs │ ├── Systems │ │ ├── ActionPointConstants.cs │ │ ├── GameManager.cs │ │ ├── HealthSystem.cs │ │ ├── LevelSystem.cs │ │ ├── LootSpawn.cs │ │ ├── LootSystem.cs │ │ ├── ObstacleSystem.cs │ │ ├── ScoreSystem.cs │ │ ├── TargetSystem.cs │ │ └── UnitSystem.cs │ ├── Tile.png │ ├── Unit.cs │ └── Utility │ │ ├── GameHelpers.cs │ │ ├── ResultMediatorExtensions.cs │ │ └── VectorExtensions.cs ├── Images │ └── kenny-1bit-monochrome-transparent_packed.png ├── InputSystem_Actions.inputactions ├── Mediator │ ├── DataMediator.cs │ ├── DataMediatorHelperGenerator.cs │ ├── MediatorHandlerAttribute.cs │ └── MediatorMessageAttribute.cs ├── Monads │ ├── FailureTypes.cs │ ├── GarbageFreeAttribute.cs │ ├── Result.cs │ ├── ResultExtensions.cs │ ├── ResultLinqExtensions.cs │ ├── ResultOfT.cs │ └── ResultUnityExtensions.cs ├── Prefabs │ ├── Cheese.prefab │ ├── Coin.prefab │ ├── Door-Locked.prefab │ ├── FireBottomBlock.prefab │ ├── Firebolt.prefab │ ├── Flag.prefab │ ├── GameArea.asset │ ├── GarbageFreeSquare.prefab │ ├── Goblin.prefab │ ├── GreenSquare.prefab │ ├── Heart-Empty.prefab │ ├── Heart-Full.prefab │ ├── Heart-Half.prefab │ ├── Key.prefab │ ├── Main Camera.prefab │ ├── Meat.prefab │ ├── Outside-Wall.prefab │ ├── Player.prefab │ ├── Potion.prefab │ └── Target-Cursor.prefab ├── Scenes │ ├── GarbageTest.unity │ ├── RealWorldUses.unity │ └── SimpleUses.unity ├── Settings │ ├── Lit2DSceneTemplate.scenetemplate │ ├── Renderer2D.asset │ ├── Scenes │ │ └── URP2DSceneTemplate.unity │ └── UniversalRP.asset ├── TextMesh Pro │ ├── Fonts │ │ ├── LiberationSans - OFL.txt │ │ └── LiberationSans.ttf │ ├── Resources │ │ ├── Fonts & Materials │ │ │ ├── LiberationSans SDF - Drop Shadow.mat │ │ │ ├── LiberationSans SDF - Fallback.asset │ │ │ ├── LiberationSans SDF - Outline.mat │ │ │ └── LiberationSans SDF.asset │ │ ├── LineBreaking Following Characters.txt │ │ ├── LineBreaking Leading Characters.txt │ │ ├── Sprite Assets │ │ │ └── EmojiOne.asset │ │ ├── Style Sheets │ │ │ └── Default Style Sheet.asset │ │ └── TMP Settings.asset │ ├── Shaders │ │ ├── SDFFunctions.hlsl │ │ ├── TMP_Bitmap-Custom-Atlas.shader │ │ ├── TMP_Bitmap-Mobile.shader │ │ ├── TMP_Bitmap.shader │ │ ├── TMP_SDF Overlay.shader │ │ ├── TMP_SDF SSD.shader │ │ ├── TMP_SDF-HDRP LIT.shadergraph │ │ ├── TMP_SDF-HDRP UNLIT.shadergraph │ │ ├── TMP_SDF-Mobile Masking.shader │ │ ├── TMP_SDF-Mobile Overlay.shader │ │ ├── TMP_SDF-Mobile SSD.shader │ │ ├── TMP_SDF-Mobile-2-Pass.shader │ │ ├── TMP_SDF-Mobile.shader │ │ ├── TMP_SDF-Surface-Mobile.shader │ │ ├── TMP_SDF-Surface.shader │ │ ├── TMP_SDF-URP Lit.shadergraph │ │ ├── TMP_SDF-URP Unlit.shadergraph │ │ ├── TMP_SDF.shader │ │ ├── TMP_Sprite.shader │ │ ├── TMPro.cginc │ │ ├── TMPro_Mobile.cginc │ │ ├── TMPro_Properties.cginc │ │ └── TMPro_Surface.cginc │ └── Sprites │ │ ├── EmojiOne Attribution.txt │ │ ├── EmojiOne.json │ │ └── EmojiOne.png └── UniversalRenderPipelineGlobalSettings.asset ├── LICENSE ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── MemorySettings.asset ├── MultiplayerManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── PackageManagerSettings.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── SceneTemplateSettings.json ├── ShaderGraphSettings.asset ├── TagManager.asset ├── TimeManager.asset ├── URPProjectSettings.asset ├── UnityConnectSettings.asset ├── VFXManager.asset ├── VersionControlSettings.asset └── XRSettings.asset └── README.md /.idea/.idea.Unity-Monads/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Rider ignored files 5 | /modules.xml 6 | /contentModel.xml 7 | /projectSettingsUpdater.xml 8 | /.idea.Unity-Monads.iml 9 | # Editor-based HTTP Client requests 10 | /httpRequests/ 11 | # Datasource local storage ignored files 12 | /dataSources/ 13 | /dataSources.local.xml 14 | -------------------------------------------------------------------------------- /.idea/.idea.Unity-Monads/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.idea/.idea.Unity-Monads/.idea/indexLayout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/.idea.Unity-Monads/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Assembly-CSharp-Editor.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True -------------------------------------------------------------------------------- /Assembly-CSharp.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True 3 | True 4 | True 5 | True 6 | True 7 | True 8 | True 9 | True 10 | True -------------------------------------------------------------------------------- /Assets/CompilerServices.cs: -------------------------------------------------------------------------------- 1 | // DO NOT REMOVE 2 | namespace System.Runtime.CompilerServices 3 | { 4 | internal static class IsExternalInit {} 5 | } -------------------------------------------------------------------------------- /Assets/Editor/GameAreaEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | [CustomEditor(typeof(GameArea))] 5 | public class GameAreaEditor : Editor 6 | { 7 | private SerializedProperty areaProperty; 8 | private SerializedProperty showGizmoProperty; 9 | 10 | private void OnEnable() 11 | { 12 | areaProperty = serializedObject.FindProperty("Area"); 13 | showGizmoProperty = serializedObject.FindProperty("ShowGizmo"); 14 | } 15 | 16 | private void OnSceneGUI() 17 | { 18 | var gameArea = (GameArea)target; 19 | 20 | if (!gameArea.ShowGizmo) 21 | return; 22 | 23 | // Retrieve the RectInt area 24 | var area = gameArea.Area; 25 | 26 | // Convert RectInt to world positions 27 | var bottomLeft = new Vector3(area.xMin, area.yMin, 0); 28 | var topLeft = new Vector3(area.xMin, area.yMax, 0); 29 | var bottomRight = new Vector3(area.xMax, area.yMin, 0); 30 | var topRight = new Vector3(area.xMax, area.yMax, 0); 31 | 32 | // Draw the rectangle outline 33 | Handles.color = Color.green; 34 | Handles.DrawAAPolyLine(3, bottomLeft, bottomRight, topRight, topLeft, bottomLeft); 35 | 36 | // Add position handles to adjust the bottom-left and top-right corners 37 | EditorGUI.BeginChangeCheck(); 38 | var newBottomLeft = Handles.PositionHandle(bottomLeft, Quaternion.identity); 39 | var newTopRight = Handles.PositionHandle(topRight, Quaternion.identity); 40 | 41 | if (EditorGUI.EndChangeCheck()) 42 | { 43 | Undo.RecordObject(gameArea, "Adjust GameArea Rect"); 44 | 45 | // Calculate the new RectInt values based on updated positions 46 | var newX = Mathf.RoundToInt(newBottomLeft.x); 47 | var newY = Mathf.RoundToInt(newBottomLeft.y); 48 | var newWidth = Mathf.RoundToInt(newTopRight.x - newBottomLeft.x); 49 | var newHeight = Mathf.RoundToInt(newTopRight.y - newBottomLeft.y); 50 | 51 | gameArea.Area = new RectInt(newX, newY, newWidth, newHeight); 52 | EditorUtility.SetDirty(gameArea); 53 | } 54 | } 55 | 56 | public override void OnInspectorGUI() 57 | { 58 | serializedObject.Update(); 59 | 60 | EditorGUILayout.PropertyField(showGizmoProperty); 61 | EditorGUILayout.PropertyField(areaProperty); 62 | 63 | serializedObject.ApplyModifiedProperties(); 64 | } 65 | } -------------------------------------------------------------------------------- /Assets/Editor/LevelSystemEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | [CanEditMultipleObjects] 5 | [CustomEditor(typeof(LevelSystem))] 6 | public class LevelSystemEditor : Editor 7 | { 8 | public override void OnInspectorGUI() 9 | { 10 | // Draw the default Inspector 11 | DrawDefaultInspector(); 12 | 13 | // Add a custom button 14 | LevelSystem levelSystem = (LevelSystem)target; 15 | if (GUILayout.Button("Clear Walls")) 16 | { 17 | levelSystem.ClearOutsideWalls(); 18 | } 19 | 20 | if (GUILayout.Button("Draw Walls")) 21 | { 22 | levelSystem.DrawOutsideWalls(); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Assets/Examples/Info.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class Info : MonoBehaviour 4 | { 5 | public string Name; 6 | } 7 | -------------------------------------------------------------------------------- /Assets/Examples/LootSpawnInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | [Serializable] 5 | public class LootSpawnInfo 6 | { 7 | public GameObject Item; 8 | public int Count; 9 | } -------------------------------------------------------------------------------- /Assets/Examples/Messages/FailureTypes.cs: -------------------------------------------------------------------------------- 1 | // easily add your own failure types specific to your game 2 | 3 | using Monads; 4 | using UnityEngine; 5 | 6 | public record PathBlocked(Vector2Int Position) : Failure; 7 | 8 | public record LimitExceeded(string Type, int Max) : Failure 9 | { 10 | public const int DEFAULT_MAX = 100; 11 | 12 | // add static failures where possible to avoid unnecessary allocations 13 | public static readonly LimitExceeded ObstacleCountExceeded = new("Obstacles", DEFAULT_MAX); 14 | public static readonly LimitExceeded LootCountExceeded = new("Loot", DEFAULT_MAX); 15 | public static readonly LimitExceeded UnitCountExceeded = new("Units", DEFAULT_MAX); 16 | } 17 | 18 | public record MissingComponent(string ComponentName, string GameObjectName) : Failure; 19 | 20 | public record SceneNotLoaded(string SceneName) : Failure; 21 | 22 | public record InvalidPrefab(string PrefabName) : Failure; 23 | 24 | public record OutOfBounds(string ObjectName, string BoundsName) : Failure; 25 | 26 | public record AssetLoadFailure(string AssetPath) : Failure; 27 | 28 | public record AnimationFailure(string AnimatorName, string StateName) : Failure; 29 | 30 | public record AudioFailure(string AudioClipName) : Failure; 31 | 32 | public record PhysicsFailure(string ObjectName) : Failure; 33 | 34 | public record NullTransform(string GameObjectName) : Failure; 35 | 36 | public record InvalidOperation(string OperationName) : Failure; 37 | 38 | public record SpawnFailure(string PrefabName, string Position) : Failure; 39 | 40 | public record InputFailure(string InputName, string Reason) : Failure; -------------------------------------------------------------------------------- /Assets/Examples/Messages/GameMessages.cs: -------------------------------------------------------------------------------- 1 | [MediatorMessage] 2 | public readonly struct NewGame { } 3 | 4 | [MediatorMessage] 5 | public readonly struct PlayerDead { } 6 | 7 | [MediatorMessage] 8 | public readonly struct AddGold 9 | { 10 | public readonly int Amount; 11 | 12 | public AddGold(int amount) 13 | { 14 | Amount = amount; 15 | } 16 | } 17 | 18 | [MediatorMessage] 19 | public readonly struct AddScore 20 | { 21 | public readonly int Amount; 22 | 23 | public AddScore(int amount) 24 | { 25 | Amount = amount; 26 | } 27 | } -------------------------------------------------------------------------------- /Assets/Examples/Messages/LootMessages.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | [MediatorMessage] 5 | public readonly struct GetAllLootPositions {} 6 | 7 | [MediatorMessage] 8 | public readonly struct RegisterLoot 9 | { 10 | public readonly GameObject Unit; 11 | 12 | public RegisterLoot(GameObject unit) 13 | { 14 | Unit = unit; 15 | } 16 | } 17 | 18 | [MediatorMessage] 19 | public readonly struct GetAllLootPositionsResponse 20 | { 21 | public readonly IEnumerable Points; 22 | 23 | public GetAllLootPositionsResponse(IEnumerable points) 24 | { 25 | Points = points; 26 | } 27 | } 28 | 29 | [MediatorMessage] 30 | public readonly struct DetectLoot 31 | { 32 | public readonly Vector2Int Position; 33 | 34 | public DetectLoot(Vector2Int position) 35 | { 36 | Position = position; 37 | } 38 | } 39 | 40 | [MediatorMessage] 41 | public readonly struct GetLoot 42 | { 43 | public readonly GameObject Unit; 44 | public readonly GameObject Loot; 45 | 46 | public GetLoot(GameObject unit, GameObject loot) 47 | { 48 | Unit = unit; 49 | Loot = loot; 50 | } 51 | } -------------------------------------------------------------------------------- /Assets/Examples/Messages/ObstacleMessages.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | [MediatorMessage] 5 | public struct RegisterObstacle 6 | { 7 | public readonly GameObject Obstacle; 8 | 9 | public RegisterObstacle(GameObject obstacle) 10 | { 11 | Obstacle = obstacle; 12 | } 13 | } 14 | 15 | [MediatorMessage] 16 | public struct DetectObstacle 17 | { 18 | public readonly Vector2Int Position; 19 | 20 | public DetectObstacle(Vector2Int position) 21 | { 22 | Position = position; 23 | } 24 | } 25 | 26 | [MediatorMessage] 27 | public struct GetAllObstaclePositions {} 28 | 29 | public struct GetAllObstaclePositionsResponse 30 | { 31 | public readonly IEnumerable Points; 32 | 33 | public GetAllObstaclePositionsResponse(IEnumerable points) 34 | { 35 | Points = points; 36 | } 37 | } -------------------------------------------------------------------------------- /Assets/Examples/Messages/TargetMessages.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | [MediatorMessage] 4 | public readonly struct TargetPosition 5 | { 6 | public readonly Vector2Int Position; 7 | 8 | public TargetPosition(Vector2Int position) 9 | { 10 | Position = position; 11 | } 12 | } 13 | 14 | [MediatorMessage] 15 | public readonly struct TargetPositionResponse 16 | { 17 | public readonly GameObject Target; 18 | public readonly TargetType Type; 19 | 20 | public TargetPositionResponse( 21 | GameObject target, 22 | TargetType type) 23 | { 24 | Target = target; 25 | Type = type; 26 | } 27 | } 28 | 29 | [MediatorMessage] 30 | public readonly struct TargetSpotted 31 | { 32 | public readonly Vector2Int Position; 33 | public readonly GameObject Target; 34 | public readonly TargetType Type; 35 | 36 | public TargetSpotted( 37 | Vector2Int position, 38 | GameObject target, 39 | TargetType type) 40 | { 41 | Position = position; 42 | Target = target; 43 | Type = type; 44 | } 45 | } 46 | 47 | public enum TargetType 48 | { 49 | None = 0, 50 | Unit, 51 | Loot, 52 | Obstacle 53 | } -------------------------------------------------------------------------------- /Assets/Examples/Messages/UnitMessages.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | [MediatorMessage] 5 | public readonly struct MoveUnit 6 | { 7 | public readonly GameObject Unit; 8 | public readonly Vector2Int Destination; 9 | 10 | public MoveUnit(GameObject unit, Vector2Int destination) 11 | { 12 | Unit = unit; 13 | Destination = destination; 14 | } 15 | } 16 | 17 | [MediatorMessage] 18 | public readonly struct RegisterUnit 19 | { 20 | public readonly GameObject Unit; 21 | 22 | public RegisterUnit(GameObject unit) 23 | { 24 | Unit = unit; 25 | } 26 | } 27 | 28 | public readonly struct MoveUnitResponse 29 | { 30 | public readonly Vector2Int LandingPosition; 31 | public readonly int ActionPoints; 32 | 33 | public MoveUnitResponse(Vector2Int landingPosition, int actionPoints) 34 | { 35 | LandingPosition = landingPosition; 36 | ActionPoints = actionPoints; 37 | } 38 | } 39 | 40 | [MediatorMessage] 41 | public readonly struct GetAllUnitPositions {} 42 | 43 | [MediatorMessage] 44 | public readonly struct GetAllUnitPositionsResponse 45 | { 46 | public readonly IEnumerable Points; 47 | 48 | public GetAllUnitPositionsResponse(IEnumerable points) 49 | { 50 | Points = points; 51 | } 52 | } 53 | 54 | [MediatorMessage] 55 | public readonly struct DetectUnit 56 | { 57 | public readonly Vector2Int Position; 58 | 59 | public DetectUnit(Vector2Int position) 60 | { 61 | Position = position; 62 | } 63 | } -------------------------------------------------------------------------------- /Assets/Examples/Obstacle.cs: -------------------------------------------------------------------------------- 1 | using Monads; 2 | using UnityEngine; 3 | 4 | public class Obstacle : MonoBehaviour 5 | { 6 | private void Start() 7 | { 8 | DataMediator.Instance 9 | .Send(new RegisterObstacle(gameObject)) 10 | .OnFailure(fail => Debug.LogError($"{fail} - Failed to register obstacle {name} at {transform.position}")); 11 | 12 | // Mediator 13 | // .Send(new RegisterObstacle(gameObject)) 14 | // .OnFailure(fail => Debug.LogError($"{fail} - Failed to register obstacle {name} at {transform.position}")); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Assets/Examples/Pickup.cs: -------------------------------------------------------------------------------- 1 | using Monads; 2 | using UnityEngine; 3 | 4 | public class Pickup : MonoBehaviour 5 | { 6 | public int Score = 1; 7 | public int Gold = 1; 8 | 9 | private void Start() 10 | { 11 | DataMediator.Instance.Send(new RegisterLoot(gameObject)); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Assets/Examples/PlayerController.cs: -------------------------------------------------------------------------------- 1 | using Monads; 2 | using UnityEngine; 3 | using UnityEngine.InputSystem; 4 | using UnityUtils; 5 | 6 | public class PlayerController : Singleton 7 | { 8 | public Camera MainCamera; 9 | public GameObject ControlledUnit; 10 | 11 | public float MinDelay = 0.15f; 12 | private float lastMove = float.MinValue; 13 | 14 | private Result PressedTwiceTooQuickly() 15 | => (Mathf.Abs(Time.time - lastMove) < MinDelay).ToResult(); 16 | 17 | public void OnMove(InputAction.CallbackContext context) 18 | { 19 | // one event per input-device user action 20 | if (context.phase != InputActionPhase.Performed) 21 | return; 22 | 23 | if (PressedTwiceTooQuickly()) 24 | return; 25 | 26 | if (!ControlledUnit) 27 | { 28 | Debug.LogWarning("No controlled unit"); 29 | return; 30 | } 31 | 32 | // read the value for the "move" action each event call 33 | var moveAmount = context.ReadValue().ToV2I(); 34 | if (moveAmount == Vector2Int.zero) 35 | return; 36 | 37 | var newUnitPosition = ControlledUnit.transform.position.ToV2I() + moveAmount; 38 | DataMediator.Instance 39 | .Send>(new MoveUnit(ControlledUnit, newUnitPosition)) 40 | .OnSuccess(response => { 41 | ControlledUnit.transform.position = response.LandingPosition.ToV3(); 42 | }); 43 | 44 | lastMove = Time.time; 45 | } 46 | 47 | public void OnTarget(InputAction.CallbackContext context) 48 | { 49 | // one event per input-device user action 50 | if (context.phase != InputActionPhase.Performed) 51 | return; 52 | 53 | var mousePosition = context.ReadValue(); 54 | var worldPosition = MainCamera.ScreenToWorldPoint(mousePosition).ToV2IRound(); 55 | 56 | // avoiding fluent chaining here to 57 | // avoid anonymous functions and garbage 58 | var result = DataMediator.Instance.Send>(new TargetPosition(worldPosition)); 59 | 60 | if (result) 61 | { 62 | DataMediator.Instance.Publish(new TargetSpotted( 63 | position: worldPosition, 64 | target: result.SuccessValue.Target, 65 | type: result.SuccessValue.Type)); 66 | // Mediator.Publish(new TargetSpotted( 67 | // position: worldPosition, 68 | // target: result.SuccessValue.Target, 69 | // type: result.SuccessValue.Type)); 70 | } 71 | else 72 | { 73 | DataMediator.Instance.Publish(new TargetSpotted( 74 | position: worldPosition, 75 | target: null, 76 | type: TargetType.None)); 77 | // Mediator.Publish(new TargetSpotted( 78 | // position: worldPosition, 79 | // target: null, 80 | // type: TargetType.None)); 81 | } 82 | } 83 | } -------------------------------------------------------------------------------- /Assets/Examples/SO/GameArea.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | [CreateAssetMenu(fileName = "NewGameArea", menuName = "SO/Game Area")] 5 | public class GameArea : ScriptableObject 6 | { 7 | [Header("Game Area Configuration")] 8 | [Tooltip("Defines the area as an integer rectangle (x, y, width, height).")] 9 | public RectInt Area = new(0, 0, 10, 10); 10 | 11 | [Tooltip("Show the gizmo in the editor for visualization.")] 12 | public bool ShowGizmo = true; 13 | 14 | #if UNITY_EDITOR 15 | 16 | /// 17 | /// Draws the gizmo in the Scene view when this GameArea is being inspected. 18 | /// 19 | private void OnDrawGizmos() 20 | { 21 | if (!ShowGizmo) return; 22 | 23 | // Set gizmo color 24 | Gizmos.color = new Color(0, 1, 0, 0.3f); // Semi-transparent green 25 | 26 | // Draw a rectangle using the Area property 27 | var position = new Vector3(Area.x, Area.y, 0); 28 | var size = new Vector3(Area.width, Area.height, 0); 29 | 30 | Gizmos.DrawCube(position + size / 2, size); 31 | 32 | // Outline for better visibility 33 | Gizmos.color = Color.green; 34 | Gizmos.DrawWireCube(position + size / 2, size); 35 | } 36 | #endif 37 | } -------------------------------------------------------------------------------- /Assets/Examples/SO/GameAreaVisualizer.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | 4 | [ExecuteAlways] 5 | public class GameAreaVisualizer : MonoBehaviour 6 | { 7 | public GameArea gameArea; // Reference to the ScriptableObject 8 | 9 | private void OnDrawGizmos() 10 | { 11 | if (gameArea == null || !gameArea.ShowGizmo) 12 | return; 13 | 14 | DrawGameAreaGizmo(); 15 | } 16 | 17 | private void OnDrawGizmosSelected() 18 | { 19 | if (gameArea == null || !gameArea.ShowGizmo) 20 | return; 21 | 22 | DrawGameAreaGizmo(); 23 | DrawAndEditHandles(); 24 | } 25 | 26 | private void DrawGameAreaGizmo() 27 | { 28 | Gizmos.color = Color.green; 29 | 30 | // Convert RectInt area to world-space positions 31 | RectInt area = gameArea.Area; 32 | Vector3 bottomLeft = new Vector3(area.xMin, area.yMin, 0); 33 | Vector3 topLeft = new Vector3(area.xMin, area.yMax, 0); 34 | Vector3 bottomRight = new Vector3(area.xMax, area.yMin, 0); 35 | Vector3 topRight = new Vector3(area.xMax, area.yMax, 0); 36 | 37 | // Draw the rectangular outline 38 | Gizmos.DrawLine(bottomLeft, bottomRight); 39 | Gizmos.DrawLine(bottomRight, topRight); 40 | Gizmos.DrawLine(topRight, topLeft); 41 | Gizmos.DrawLine(topLeft, bottomLeft); 42 | } 43 | 44 | private void DrawAndEditHandles() 45 | { 46 | RectInt area = gameArea.Area; 47 | 48 | // Define initial positions for the handles 49 | Vector3 bottomLeft = new Vector3(area.xMin, area.yMin, 0); 50 | Vector3 topRight = new Vector3(area.xMax, area.yMax, 0); 51 | 52 | // Handle size and type 53 | float handleSize = HandleUtility.GetHandleSize(bottomLeft) * 0.1f; 54 | 55 | EditorGUI.BeginChangeCheck(); 56 | 57 | // Use Handles.Slider to allow moving corners 58 | bottomLeft = Handles.Slider2D( 59 | bottomLeft, Vector3.forward, Vector3.right, Vector3.up, handleSize, Handles.RectangleHandleCap, Vector2.zero); 60 | 61 | topRight = Handles.Slider2D( 62 | topRight, Vector3.forward, Vector3.right, Vector3.up, handleSize, Handles.RectangleHandleCap, Vector2.zero); 63 | 64 | if (EditorGUI.EndChangeCheck()) 65 | { 66 | Undo.RecordObject(gameArea, "Move Game Area Handles"); 67 | 68 | // Update RectInt based on adjusted handles 69 | gameArea.Area = new RectInt( 70 | Mathf.RoundToInt(bottomLeft.x), 71 | Mathf.RoundToInt(bottomLeft.y), 72 | Mathf.RoundToInt(topRight.x - bottomLeft.x), 73 | Mathf.RoundToInt(topRight.y - bottomLeft.y) 74 | ); 75 | } 76 | 77 | // Draw the updated rectangle with Handles 78 | Handles.color = Color.red; 79 | Handles.DrawLine(bottomLeft, new Vector3(topRight.x, bottomLeft.y, 0)); // bottom edge 80 | Handles.DrawLine(bottomLeft, new Vector3(bottomLeft.x, topRight.y, 0)); // left edge 81 | Handles.DrawLine(topRight, new Vector3(topRight.x, bottomLeft.y, 0)); // right edge 82 | Handles.DrawLine(topRight, new Vector3(bottomLeft.x, topRight.y, 0)); // top edge 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /Assets/Examples/SimpleTests.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using Monads; 3 | using NUnit.Framework; 4 | using UnityEngine; 5 | 6 | public class SimpleTests : MonoBehaviour 7 | { 8 | public GameObject SomeGameObject; 9 | public GameObject EmptyGameObject; 10 | 11 | private Color color; 12 | 13 | // for readability, any LogError() is a condition that should never happen 14 | // Any Log() is expected, despite what message contains 15 | private void Start() 16 | { 17 | // some / none, Option 18 | GameObject go = null; 19 | var result = go.ToResult(); 20 | result.OnFailure(_ => Debug.Log("null is always a failure condition")); 21 | Assert.AreEqual(result.FailureValue, NullReference.Failure); 22 | 23 | // this code doesn't crash even if the SpriteRenderer doesn't exist 24 | var spriteRenderer = gameObject.ToResult().GetSafeComponent(); 25 | spriteRenderer.OnSuccess( 26 | render => 27 | { 28 | render.color = Color.red; 29 | Debug.LogError($"{gameObject.name} made a sprite red without a SpriteRenderer!"); 30 | }); 31 | 32 | // we want to find the component on our own GameObject first, 33 | // then optionally check our children when that fails. 34 | // let's use fluent (chaining) syntax from here on 35 | gameObject 36 | .ToResult() 37 | .GetSafeComponent() 38 | .DefaultWith(_ => gameObject.ToResult().GetSafeComponentInChildren()) 39 | .OnSuccess(render => 40 | { 41 | render.color = Color.blue; 42 | color = render.color; // also, we want to set some member field or property now, so let's do that 43 | } 44 | ); 45 | if (color == Color.blue) 46 | { 47 | Debug.Log($"SpriteRenderer Found in children of {gameObject.name}"); 48 | } 49 | 50 | // note: I'm not suggesting checking for components on this GameObject, 51 | // then checking for its existence in all children, is a great approach in Unity. 52 | // 53 | // if it is, and it's something we want to do often, we could make a new extension method for that 54 | // including accepting a gameObject -or- an IResult as the source 55 | // and logging a warning when the desired BoxCollider2D isn't found 56 | gameObject 57 | .ToResult() 58 | .WithSafeComponent( 59 | audioSource => 60 | { 61 | audioSource.enabled = false; 62 | Debug.LogError("We should never get here, no AudioSource on this GameObject"); 63 | }); 64 | 65 | // we don't have a collider, so the code inside the 'Do' never happens 66 | gameObject 67 | .ToResult() 68 | .GetSafeComponent() 69 | .OnSuccess(collide => Debug.LogError($"We hit {collide.gameObject.name} and we don't even have a collider!")) 70 | .OnFailure(fail => Debug.Log($"Expected Collider Failure - {fail}")); 71 | 72 | // this GameObject exists and has a SpriteRenderer, so it turns green 73 | SomeGameObject 74 | .ToResult() 75 | .GetSafeComponent() 76 | .OnSuccess(render => render.color = Color.green) 77 | .OnSuccess(_ => Debug.Log($"SpriteRenderer found on {SomeGameObject.name}.")); 78 | 79 | // doesn't exist, so we don't get a black sprite anywhere in the game view 80 | EmptyGameObject 81 | .ToResult() 82 | .GetSafeComponent() 83 | .OnSuccess(render => render.color = Color.black) 84 | .OnFailure(_ => Debug.Log("EmptyGameObject is null and fails, as expected.")); 85 | 86 | StartCoroutine(Tick()); 87 | } 88 | 89 | private IEnumerator Tick() 90 | { 91 | // test the Unity "fake null" issue against the Result constructor 92 | var clone = new GameObject("Fake Null Test"); 93 | var result = clone.ToResult(); 94 | result.Switch( 95 | success => 96 | { 97 | Destroy(success); // clone won't actually go away until the next frame 98 | 99 | var shouldSucceed = success.ToResult(); 100 | shouldSucceed.OnFailure(fail => Debug.LogError($"Unity Object shouldn't have been a failure {fail} yet")); 101 | }, 102 | failure => Debug.LogError($"Initial Clone ToResult failed unexpectedly. {failure}") 103 | ); 104 | yield return null; // wait for the next frame 105 | 106 | var shouldFailNow = clone.ToResult(); 107 | shouldFailNow.Switch( 108 | _ => 109 | { 110 | Debug.LogError("Clone should have been null and a failure, but was not."); 111 | }, 112 | _ => Debug.Log("Clone was destroyed next frame and failed appropriately.") 113 | ); 114 | yield return null; // wait for the next frame 115 | 116 | clone = Instantiate(gameObject); // clone is OK again 117 | DestroyImmediate(clone); 118 | var shouldFailImmediately = clone.ToResult(); 119 | shouldFailImmediately.Switch( 120 | _ => 121 | { 122 | Debug.LogError("Clone should have been null and a failure immediately, but was not."); 123 | }, 124 | _ => Debug.Log("Clone was destroyed immediately and failed appropriately.") 125 | ); 126 | } 127 | } -------------------------------------------------------------------------------- /Assets/Examples/Systems/ActionPointConstants.cs: -------------------------------------------------------------------------------- 1 | public static class ActionPointConstants 2 | { 3 | public const int AP_MOVE_ONE = 1; 4 | public const int AP_PICKUP_LOOT = 3; 5 | } -------------------------------------------------------------------------------- /Assets/Examples/Systems/GameManager.cs: -------------------------------------------------------------------------------- 1 | using UnityUtils; 2 | 3 | public class GameManager : Singleton 4 | { 5 | private void NewGame() 6 | { 7 | DataMediator.Instance.Publish(new NewGame()); 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /Assets/Examples/Systems/HealthSystem.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | using UnityUtils; 4 | 5 | public class HealthSystem : Singleton 6 | { 7 | public const int DEFAULT_MAX_HEALTH = 3; 8 | 9 | [Header("Health Settings")] 10 | public int MaxHealth = DEFAULT_MAX_HEALTH; 11 | 12 | public float CurrentHealth = DEFAULT_MAX_HEALTH; 13 | public float Spacing = 1.1f; 14 | 15 | [Header("Heart Sprites")] 16 | public GameObject HeartPrefab; 17 | 18 | public Color Color; 19 | 20 | public Sprite FullHeartSprite; 21 | public Sprite HalfHeartSprite; 22 | public Sprite EmptyHeartSprite; 23 | 24 | [Header("Heart Container")] 25 | public Transform HeartContainer; // A GameObject to hold all heart icons in the UI 26 | 27 | private readonly List _hearts = new(); 28 | 29 | private void Start() 30 | { 31 | base.Awake(); 32 | UpdateHearts(); 33 | } 34 | 35 | [MediatorHandler] 36 | public void Handle(NewGame message) 37 | { 38 | MaxHealth = DEFAULT_MAX_HEALTH; 39 | CurrentHealth = DEFAULT_MAX_HEALTH; 40 | UpdateHearts(); 41 | } 42 | 43 | public void TakeDamage(float amount) 44 | { 45 | CurrentHealth = Mathf.Clamp(CurrentHealth - amount, 0, MaxHealth); 46 | UpdateHearts(); 47 | 48 | if (CurrentHealth <= 0) 49 | DataMediator.Instance.Publish(new PlayerDead()); 50 | } 51 | 52 | public void Heal(float amount) 53 | { 54 | CurrentHealth = Mathf.Clamp(CurrentHealth + amount, 0, MaxHealth); 55 | UpdateHearts(); 56 | } 57 | 58 | public void IncreaseMaxHealth(int amount) 59 | { 60 | MaxHealth += amount; 61 | CurrentHealth = Mathf.Clamp(CurrentHealth, 0, MaxHealth); 62 | UpdateHearts(); 63 | } 64 | 65 | private void UpdateHearts() 66 | { 67 | if (!HeartPrefab || !HeartContainer) 68 | { 69 | Debug.LogError("HeartPrefab or HeartContainer is not assigned in the inspector!"); 70 | 71 | if (FindObjectsByType(FindObjectsSortMode.None).Length > 1) 72 | { 73 | Debug.LogError("Multiple HealthSystem instances detected! Please ensure only one HealthSystem is present in the scene."); 74 | } 75 | 76 | return; 77 | } 78 | 79 | // Clear all current hearts 80 | while (_hearts.Count > 0) 81 | { 82 | Destroy(_hearts[0]); 83 | _hearts.RemoveAt(0); 84 | } 85 | 86 | // Draw hearts based on MaxHealth and CurrentHealth 87 | for (var i = 0; i < MaxHealth; i++) 88 | { 89 | var heart = Instantiate(HeartPrefab, HeartContainer, false); 90 | _hearts.Add(heart); 91 | 92 | var spriteRenderer = heart.GetComponent(); 93 | if (!spriteRenderer) continue; 94 | 95 | spriteRenderer.color = Color; 96 | heart.transform.localPosition = new Vector3(i * Spacing, 0, 0); 97 | 98 | if (CurrentHealth >= i + 1) 99 | spriteRenderer.sprite = FullHeartSprite; // Full heart 100 | else if (CurrentHealth > i && CurrentHealth < i + 1) 101 | spriteRenderer.sprite = HalfHeartSprite; // Half heart 102 | else 103 | spriteRenderer.sprite = EmptyHeartSprite; // Empty heart 104 | } 105 | } 106 | } -------------------------------------------------------------------------------- /Assets/Examples/Systems/LevelSystem.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | public class LevelSystem : MonoBehaviour 5 | { 6 | public Camera MainCamera; 7 | public GameArea GameArea; 8 | public GameObject OutsideWallContainer; 9 | public GameObject OutsideWall; 10 | public List PowerUps; 11 | public List Enemies; 12 | 13 | public void ClearOutsideWalls() 14 | { 15 | // Loop through all child transforms and destroy them 16 | while (OutsideWallContainer.transform.childCount > 0) 17 | { 18 | foreach (Transform child in OutsideWallContainer.transform) 19 | { 20 | DestroyImmediate(child.gameObject); 21 | } 22 | } 23 | } 24 | 25 | public void DrawOutsideWalls() 26 | { 27 | ClearOutsideWalls(); 28 | 29 | // Get the main camera 30 | var cam = MainCamera ?? Camera.main; 31 | 32 | if (!cam || !OutsideWall) 33 | { 34 | Debug.LogError("Camera or OutsideWall prefab not set!"); 35 | return; 36 | } 37 | 38 | // Calculate visible screen size 39 | var screenHeight = (int)(cam.orthographicSize * 2); 40 | var screenWidth = (int)(screenHeight * cam.aspect); 41 | 42 | // Half dimensions 43 | var halfWidth = (int)Mathf.Floor(screenWidth / 2f); 44 | var halfHeight = (int)Mathf.Floor(screenHeight / 2f); 45 | 46 | // Draw walls along all 4 edges 47 | DrawWallRow(new Vector3(-halfWidth + 1, halfHeight - 3, 0f), Vector3.right, screenWidth - 2, 180); // Top (North) 48 | DrawWallRow(new Vector3(-halfWidth + 1, -halfHeight + 1, 0f), Vector3.right, screenWidth - 2, 0); // Bottom (South) 49 | DrawWallRow(new Vector3(-halfWidth, -halfHeight + 2, 0f), Vector3.up, screenHeight - 5, 270); // Left (West) 50 | DrawWallRow(new Vector3(+halfWidth, -halfHeight + 2, 0f), Vector3.up, screenHeight - 5, 90); // Right (East) 51 | } 52 | 53 | private void DrawWallRow(Vector3 startPosition, Vector3 direction, float totalLength, float rotationZ) 54 | { 55 | var numberOfSegments = totalLength; 56 | 57 | for (var i = 0; i < numberOfSegments; i++) 58 | { 59 | // Calculate position of each wall segment 60 | var position = (startPosition + direction * i).ToV2I().ToV3(); 61 | var rotation = Quaternion.Euler(0, 0, rotationZ); 62 | 63 | // Instantiate wall segment 64 | var wall = Instantiate(OutsideWall, position, rotation, OutsideWallContainer.transform); 65 | wall.name = $"OutsideWall_{rotationZ}_{i}"; 66 | wall.transform.parent = OutsideWallContainer.transform; 67 | } 68 | } 69 | } -------------------------------------------------------------------------------- /Assets/Examples/Systems/LootSpawn.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using Monads; 4 | using UnityEngine; 5 | 6 | public class LootSpawn : MonoBehaviour 7 | { 8 | public List LootTable; 9 | public GameArea GameArea; 10 | 11 | private readonly List _occupiedPositions = new(); 12 | 13 | private void Start() 14 | { 15 | DataMediator.Instance 16 | .Send>(new GetAllObstaclePositions()) 17 | .OnSuccess(response => _occupiedPositions.AddRange(response.Points)); 18 | DataMediator.Instance 19 | .Send>(new GetAllUnitPositions()) 20 | .OnSuccess(response => _occupiedPositions.AddRange(response.Points)) 21 | ; 22 | 23 | PutCoinsInCorners(); 24 | 25 | foreach (var loot in LootTable) 26 | { 27 | for (var i = 0; i < loot.Count; i++) 28 | { 29 | var lootObject = Instantiate(loot.Item, transform.position, Quaternion.identity); 30 | lootObject.transform.SetParent(transform); 31 | lootObject.transform.localPosition = GameArea.Area.GetRandomPosition(_occupiedPositions).ToV3(); 32 | } 33 | } 34 | } 35 | 36 | private void PutCoinsInCorners() 37 | { 38 | var loot = LootTable.First(); 39 | 40 | var lootObject = Instantiate(loot.Item, transform.position, Quaternion.identity); 41 | lootObject.transform.SetParent(transform); 42 | lootObject.transform.localPosition = GameArea.Area.min.ToV3(); 43 | 44 | lootObject = Instantiate(loot.Item, transform.position, Quaternion.identity); 45 | lootObject.transform.SetParent(transform); 46 | lootObject.transform.localPosition = new Vector3(GameArea.Area.min.x, GameArea.Area.max.y, 0); 47 | 48 | lootObject = Instantiate(loot.Item, transform.position, Quaternion.identity); 49 | lootObject.transform.SetParent(transform); 50 | lootObject.transform.localPosition = new Vector3(GameArea.Area.max.x, GameArea.Area.min.y, 0); 51 | 52 | lootObject = Instantiate(loot.Item, transform.position, Quaternion.identity); 53 | lootObject.transform.SetParent(transform); 54 | lootObject.transform.localPosition = GameArea.Area.max.ToV3(); 55 | } 56 | } -------------------------------------------------------------------------------- /Assets/Examples/Systems/LootSystem.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using Monads; 4 | using TMPro; 5 | using UnityEngine; 6 | using UnityUtils; 7 | 8 | // We can create entire systems where messages map to digestible expression-body methods 9 | // This can make larger games easier to understand by a single or small group of devs 10 | public class LootSystem : Singleton 11 | { 12 | private readonly Dictionary _loot = new(); 13 | 14 | public TextMeshProUGUI GoldText; // Assign this in the inspector 15 | 16 | private int gold; 17 | 18 | private void Start() 19 | => GoldText 20 | .ToResult() 21 | .OnSuccess(ui => ui.text = gold.ToString()); 22 | 23 | [MediatorHandler] 24 | public void Handle(AddGold message) 25 | => GoldText 26 | .ToResult() 27 | .OnSuccess(text => { 28 | gold += message.Amount; 29 | text.text = gold.ToString(); 30 | }); 31 | 32 | [MediatorHandler] 33 | public void Handle(GetLoot message) 34 | => PopLoot(message.Loot.transform.position.ToV2I()) 35 | .WithSafeComponent(pickup => { 36 | if (pickup.Score > 0) 37 | DataMediator.Instance.Publish(new AddScore(pickup.Score)); 38 | 39 | if (pickup.Gold > 0) 40 | DataMediator.Instance.Publish(new AddGold(pickup.Gold)); 41 | }) 42 | .OnSuccess(Destroy); 43 | 44 | [MediatorHandler] 45 | public Result Handle(DetectLoot message) 46 | => _loot.TryGetValue(message.Position, out var loot) 47 | ? loot.ToResult() 48 | : Failure.Default; 49 | 50 | [MediatorHandler] 51 | public Result Handle(RegisterLoot message) 52 | => _loot.TryAdd(message.Unit.transform.position.ToV2I(), message.Unit).ToResult(); 53 | 54 | [MediatorHandler] 55 | private Result PopLoot(Vector2Int position) 56 | => _loot.Remove(position, out var lootObject) 57 | ? lootObject.ToResult() 58 | : Failure.Default; 59 | 60 | [MediatorHandler] 61 | public void Handle(NewGame message) 62 | { 63 | gold = 0; 64 | } 65 | 66 | [MediatorHandler] 67 | public Result Handle(GetAllLootPositions message) 68 | => new GetAllLootPositionsResponse(_loot.Keys.AsEnumerable()); 69 | } -------------------------------------------------------------------------------- /Assets/Examples/Systems/ObstacleSystem.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using Monads; 4 | using UnityEngine; 5 | using UnityUtils; 6 | 7 | // note: this approach is more 'traditional' in code approach, 8 | // while the LootSystem showcases the fluent approach 9 | // The LootSystem shows how most Handlers boil down to a single line of code 10 | // This makes digesting the Handlers easier, especially in larger projects 11 | public class ObstacleSystem : Singleton 12 | { 13 | private readonly Dictionary _obstacles = new Dictionary(); 14 | public int Count; 15 | 16 | protected override void Awake() 17 | { 18 | base.Awake(); 19 | _obstacles.Clear(); 20 | } 21 | 22 | [MediatorHandler] 23 | public Result Handle(RegisterObstacle message) 24 | { 25 | var gridPosition = message.Obstacle.transform.position.ToV2I(); 26 | if (!_obstacles.TryAdd(gridPosition, message.Obstacle)) 27 | { 28 | // in this scenario, we don't need to pass back any data, 29 | // the obstacle trying to register itself already has its own info. 30 | return Result.Fail; 31 | } 32 | 33 | Count = _obstacles.Count; 34 | 35 | return Result.Success; 36 | } 37 | 38 | [MediatorHandler] 39 | public Result Handle(DetectObstacle message) 40 | { 41 | if (_obstacles.TryGetValue(message.Position, out var obstacle)) 42 | return obstacle.ToResult(); 43 | else 44 | return Failure.Default; 45 | } 46 | 47 | [MediatorHandler] 48 | public Result Handle(GetAllObstaclePositions message) 49 | { 50 | return new GetAllObstaclePositionsResponse(_obstacles.Keys.AsEnumerable()); 51 | } 52 | } -------------------------------------------------------------------------------- /Assets/Examples/Systems/ScoreSystem.cs: -------------------------------------------------------------------------------- 1 | using Monads; 2 | using TMPro; 3 | using UnityUtils; 4 | 5 | public class ScoreSystem : 6 | Singleton 7 | { 8 | public TextMeshProUGUI ScoreText; // Assign this in the inspector 9 | 10 | private int score; 11 | 12 | private void Start() 13 | { 14 | ScoreText.text = score.ToString(); 15 | } 16 | 17 | [MediatorHandler] 18 | public void Handle(AddScore message) 19 | { 20 | ScoreText 21 | .ToResult() // if we forgot to assign the ScoreText, we don't want to crash the game 22 | .OnSuccess(ui => { 23 | score += message.Amount; 24 | ui.text = score.ToString(); 25 | }); 26 | } 27 | 28 | [MediatorHandler] 29 | public void Handle(NewGame message) 30 | { 31 | score = 0; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Assets/Examples/Systems/TargetSystem.cs: -------------------------------------------------------------------------------- 1 | using Monads; 2 | using TMPro; 3 | using UnityEngine; 4 | using UnityUtils; 5 | 6 | public class TargetSystem : 7 | Singleton 8 | { 9 | private const string DefaultTargetName = "-"; 10 | 11 | public GameObject Cursor; 12 | 13 | public TextMeshProUGUI TargetNameText; 14 | public TextMeshProUGUI TargetTypeText; 15 | 16 | private void Start() 17 | { 18 | Cursor = Instantiate(Cursor); 19 | } 20 | 21 | [MediatorHandler] 22 | public Result Handle(TargetPosition message) 23 | { 24 | var obstacleDetected = DataMediator.Instance.Send>(new DetectObstacle(message.Position)); 25 | if (obstacleDetected) 26 | { 27 | return new TargetPositionResponse(obstacleDetected.SuccessValue, TargetType.Obstacle); 28 | } 29 | 30 | var lootDetected = DataMediator.Instance.Send>(new DetectLoot(message.Position)); 31 | if (lootDetected) 32 | { 33 | return new TargetPositionResponse(lootDetected.SuccessValue, TargetType.Loot); 34 | } 35 | 36 | var unitDetected = DataMediator.Instance.Send>(new DetectUnit(message.Position)); 37 | if (unitDetected) 38 | { 39 | return new TargetPositionResponse(unitDetected.SuccessValue, TargetType.Unit); 40 | } 41 | 42 | return NotFound.Failure.ToResult(); 43 | } 44 | 45 | [MediatorHandler] 46 | public void Handle(TargetSpotted message) 47 | { 48 | Cursor.transform.position = message.Position.ToV3(); 49 | 50 | if (message.Type == TargetType.None || !message.Target) 51 | { 52 | TargetNameText.text = DefaultTargetName; 53 | TargetTypeText.text = DefaultTargetName; 54 | return; 55 | } 56 | 57 | var id = message.Target.GetComponent(); 58 | var targetName = id 59 | ? id.Name 60 | : message.Target.name; 61 | 62 | TargetNameText.text = targetName; 63 | TargetTypeText.text = message.Type.ToString(); 64 | } 65 | } -------------------------------------------------------------------------------- /Assets/Examples/Systems/UnitSystem.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using Monads; 4 | using UnityEngine; 5 | using UnityUtils; 6 | using static ActionPointConstants; 7 | 8 | public class UnitSystem : 9 | Singleton 10 | { 11 | private readonly Dictionary _units = new(); 12 | 13 | [MediatorHandler] 14 | public Result Handle(MoveUnit message) 15 | { 16 | var obstacleDetected = DataMediator.Instance.Send>(new DetectObstacle(message.Destination)); 17 | if (obstacleDetected) 18 | return new PathBlocked(message.Destination); 19 | 20 | var lootDetected = DataMediator.Instance.Send>(new DetectLoot(message.Destination)); 21 | if (lootDetected) 22 | { 23 | DataMediator.Instance.Publish(new GetLoot( 24 | unit: message.Unit, 25 | loot: lootDetected.SuccessValue)); 26 | 27 | return new MoveUnitResponse( 28 | landingPosition: message.Destination, 29 | actionPoints: AP_PICKUP_LOOT); 30 | } 31 | 32 | var unitDetected = DataMediator.Instance.Send>(new DetectUnit(message.Destination)); 33 | if (unitDetected) 34 | { 35 | //TODO: attack other unit, because we moved into their grid position 36 | 37 | return new PathBlocked(message.Destination); 38 | } 39 | 40 | return new MoveUnitResponse( 41 | landingPosition: message.Destination, 42 | actionPoints: AP_MOVE_ONE); 43 | } 44 | 45 | [MediatorHandler] 46 | public Result Handle(DetectUnit message) 47 | => _units.TryGetValue(message.Position, out var unit) 48 | ? unit.ToResult() 49 | : Failure.Default; 50 | 51 | [MediatorHandler] 52 | public Result Handle(RegisterUnit message) 53 | => _units.TryAdd(message.Unit.transform.position.ToV2I(), message.Unit).ToResult(); 54 | 55 | [MediatorHandler] 56 | public Result Handle(GetAllUnitPositions message) 57 | => new GetAllUnitPositionsResponse(Instance._units.Keys.AsEnumerable()); 58 | } -------------------------------------------------------------------------------- /Assets/Examples/Tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotus-git/Unity-Monads/36a6b143396f3301d6f8e0b1979494980cb384c6/Assets/Examples/Tile.png -------------------------------------------------------------------------------- /Assets/Examples/Unit.cs: -------------------------------------------------------------------------------- 1 | using Monads; 2 | using UnityEngine; 3 | 4 | public class Unit : MonoBehaviour 5 | { 6 | public int ActionPoints; 7 | 8 | private void Start() 9 | { 10 | DataMediator.Instance.Send(new RegisterUnit(gameObject)); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets/Examples/Utility/GameHelpers.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | public static class GameHelpers 5 | { 6 | public static Vector2Int GetRandomPosition(this RectInt rect, List occupiedPositions = null) 7 | { 8 | // Keep trying to find a random position until we find one that is not occupied 9 | while (true) 10 | { 11 | var randomX = Random.Range(rect.xMin, rect.xMax); // Inclusive xMin, exclusive xMax 12 | var randomY = Random.Range(rect.yMin, rect.yMax); // Inclusive yMin, exclusive yMax 13 | 14 | var randomPosition = new Vector2Int(randomX, randomY); 15 | 16 | if (occupiedPositions == null) 17 | { 18 | return randomPosition; 19 | } 20 | 21 | if (!occupiedPositions.Contains(randomPosition)) 22 | { 23 | occupiedPositions.Add(randomPosition); 24 | return randomPosition; 25 | } 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /Assets/Examples/Utility/ResultMediatorExtensions.cs: -------------------------------------------------------------------------------- 1 | // using Monads; 2 | // using UniMediator; 3 | // 4 | // public static class ResultMediatorExtensions 5 | // { 6 | // public static Result Send( 7 | // this Result result, 8 | // ISingleMessage> message) 9 | // { 10 | // return result.IsSuccess 11 | // ? DataMediator.Instance.Send(message) 12 | // : new Result(result); 13 | // } 14 | // 15 | // public static Result Send(ISingleMessage message) 16 | // { 17 | // return DataMediator.Instance.Send(message); 18 | // } 19 | // } -------------------------------------------------------------------------------- /Assets/Examples/Utility/VectorExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | using UnityEngine; 3 | 4 | // ReSharper disable UnusedMember.Global 5 | // ReSharper disable MemberCanBePrivate.Global 6 | 7 | public static class VectorExtensions 8 | { 9 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 10 | public static Vector2 V2(float x, float y) => new Vector2(x, y); 11 | 12 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 13 | public static Vector2Int V2I(int x, int y) => new Vector2Int(x, y); 14 | 15 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 16 | public static Vector3 V3(float x, float y) => new Vector3(x, y); 17 | 18 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 19 | public static Vector3 V3(float x, float y, float z) => new Vector3(x, y, z); 20 | 21 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 22 | public static Vector3Int V3I(int x, int y) => new Vector3Int(x, y, 0); 23 | 24 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 25 | public static Vector3Int V3I(int x, int y, int z) => new Vector3Int(x, y, z); 26 | 27 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 28 | public static Vector3 WithX(this Vector3 copy, float x) => new(x, copy.y, copy.z); 29 | 30 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 31 | public static Vector3 WithY(this Vector3 copy, float y) => new(copy.x, y, copy.z); 32 | 33 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 34 | public static Vector3 WithZ(this Vector3 copy, float z) => new(copy.x, z, copy.z); 35 | 36 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 37 | public static Vector3 ToV3(this Vector2 vector2, float z = 0f) => 38 | new(vector2.x, vector2.y, z); 39 | 40 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 41 | public static Vector2Int ToV2I(this Vector2 vector2) => 42 | new(Mathf.FloorToInt(vector2.x), Mathf.FloorToInt(vector2.y)); 43 | 44 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 45 | public static Vector2Int ToV2IRound(this Vector2 vector2) => 46 | new(Mathf.RoundToInt(vector2.x), Mathf.RoundToInt(vector2.y)); 47 | 48 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 49 | public static Vector3Int ToV3I(this Vector2 vector2, int z = 0) => 50 | new(Mathf.FloorToInt(vector2.x), Mathf.FloorToInt(vector2.y), z); 51 | 52 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 53 | public static Vector3Int ToV3IRound(this Vector2 vector2, int z = 0) => 54 | new(Mathf.RoundToInt(vector2.x), Mathf.RoundToInt(vector2.y), z); 55 | 56 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 57 | public static Vector2 ToV2(this Vector2Int vector2Int) => 58 | new(vector2Int.x, vector2Int.y); 59 | 60 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 61 | public static Vector3 ToV3(this Vector2Int vector2Int, float z = 0f) => 62 | new(vector2Int.x, vector2Int.y, z); 63 | 64 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 65 | public static Vector3Int ToV3I(this Vector2Int vector2Int, int z = 0) => 66 | new(vector2Int.x, vector2Int.y, z); 67 | 68 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 69 | public static Vector2 ToV2(this Vector3 vector3) => 70 | new(vector3.x, vector3.y); 71 | 72 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 73 | public static Vector2Int ToV2I(this Vector3 vector3) => 74 | new(Mathf.FloorToInt(vector3.x), Mathf.FloorToInt(vector3.y)); 75 | 76 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 77 | public static Vector2Int ToV2IRound(this Vector3 vector3) => 78 | new(Mathf.RoundToInt(vector3.x), Mathf.RoundToInt(vector3.y)); 79 | 80 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 81 | public static Vector3Int ToV3I(this Vector3 vector3) => 82 | new(Mathf.FloorToInt(vector3.x), Mathf.FloorToInt(vector3.y), Mathf.FloorToInt(vector3.z)); 83 | 84 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 85 | public static Vector3Int ToV3IRound(this Vector3 vector3) => 86 | new(Mathf.RoundToInt(vector3.x), Mathf.RoundToInt(vector3.y), Mathf.RoundToInt(vector3.z)); 87 | 88 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 89 | public static Vector2 ToV2(this Vector3Int vector3Int) => 90 | new(vector3Int.x, vector3Int.y); 91 | 92 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 93 | public static Vector2Int ToV2I(this Vector3Int vector3Int) => 94 | new(vector3Int.x, vector3Int.y); 95 | 96 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 97 | public static Vector3 ToV3(this Vector3Int vector3Int) => 98 | new(vector3Int.x, vector3Int.y, vector3Int.z); 99 | 100 | public static int DistanceTo(this Vector2Int from, Vector2Int to) => 101 | Mathf.Abs(from.x - to.x) + Mathf.Abs(from.y - to.y); 102 | } -------------------------------------------------------------------------------- /Assets/Images/kenny-1bit-monochrome-transparent_packed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotus-git/Unity-Monads/36a6b143396f3301d6f8e0b1979494980cb384c6/Assets/Images/kenny-1bit-monochrome-transparent_packed.png -------------------------------------------------------------------------------- /Assets/Mediator/DataMediatorHelperGenerator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Linq; 4 | using System.Reflection; 5 | using Core.Extensions; 6 | using UnityEditor; 7 | using UnityEngine; 8 | 9 | namespace Mediator 10 | { 11 | public class DataMediatorHelperGenerator : EditorWindow 12 | { 13 | private const string USER_CODE_ASSEMBLY = "Assembly-CSharp"; 14 | 15 | [MenuItem("Tools/Generate DataMediator Helper")] 16 | public static void GenerateCode() 17 | { 18 | var outputPath = Path.Combine(Application.dataPath, "Code", "Mediator", "DataMediatorHelper.cs"); 19 | if (File.Exists(outputPath)) 20 | { 21 | File.Delete(outputPath); 22 | } 23 | 24 | // Reflection logic here 25 | var methods = AppDomain.CurrentDomain 26 | .GetAssemblies() 27 | .Where(assembly => assembly.FullName.StartsWith(USER_CODE_ASSEMBLY)) 28 | .SelectMany(assembly => assembly.GetTypes()) 29 | .Where(type => type.IsClass && !type.IsAbstract && type.IsPublic) // Skip interfaces, abstracts, and non-public types 30 | .SelectMany(type => type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic)) 31 | .Where(method => method.GetCustomAttribute() != null); 32 | 33 | // Code generation logic 34 | using (var writer = new StreamWriter(outputPath)) 35 | { 36 | writer.WriteLine("using UnityEngine;"); 37 | writer.WriteLine("using Monads;"); 38 | writer.WriteLine("using Features.Obstacles;"); 39 | 40 | writer.WriteLine("namespace Mediator"); 41 | writer.WriteLine("{"); 42 | writer.WriteLine(" public static class DM"); 43 | writer.WriteLine(" {"); 44 | 45 | foreach (var method in methods) 46 | { 47 | var parameters = method.GetParameters(); 48 | if (parameters.Length != 1) 49 | throw new InvalidOperationException($"Handler '{method.Name}' must have exactly one parameter."); 50 | 51 | var requestType = parameters[0].ParameterType; 52 | var responseType = method.ReturnType; 53 | 54 | if (!requestType.IsValueType || !responseType.IsValueType) 55 | throw new InvalidOperationException($"Handler '{method.Name}' must use structs for both request and response types."); 56 | 57 | if (responseType == typeof(void)) 58 | { 59 | // Multicast handler registration (for Publish) 60 | writer.WriteLine($" public static void {method.Name}({requestType.GetConstructorParametersString()})"); 61 | writer.WriteLine( " {"); 62 | writer.WriteLine($" return DataMediator.Instance.Publish<{requestType.Name}>(new {requestType.Name}({requestType.GetConstructorParameterNamesString()}));"); 63 | writer.WriteLine( " }"); 64 | } 65 | else 66 | { 67 | // Single handler registration (for Send) 68 | writer.WriteLine($" public static {responseType.Name} {method.Name}({requestType.GetConstructorParametersString()})"); 69 | writer.WriteLine( " {"); 70 | writer.WriteLine($" return DataMediator.Instance.Send<{requestType.Name}, {responseType.Name}>(new {requestType.Name}({requestType.GetConstructorParameterNamesString()}));"); 71 | writer.WriteLine( " }"); 72 | } 73 | } 74 | 75 | writer.WriteLine(" }"); 76 | writer.WriteLine("}"); 77 | } 78 | 79 | Debug.Log($"Code generated at: {outputPath}"); 80 | AssetDatabase.Refresh(); // Refresh the Unity Editor to detect the new script 81 | } 82 | } 83 | } -------------------------------------------------------------------------------- /Assets/Mediator/MediatorHandlerAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | [AttributeUsage(AttributeTargets.Method)] 4 | public class MediatorHandlerAttribute : Attribute { } -------------------------------------------------------------------------------- /Assets/Mediator/MediatorMessageAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | [AttributeUsage(AttributeTargets.Struct)] 4 | public class MediatorMessageAttribute : Attribute { } -------------------------------------------------------------------------------- /Assets/Monads/GarbageFreeAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Monads 4 | { 5 | /// 6 | /// marker attribute indicating no heap garbage generated 7 | /// does not ensure calling code is garbage free 8 | /// 9 | [AttributeUsage(AttributeTargets.Method)] 10 | public class GarbageFreeAttribute : Attribute 11 | { 12 | } 13 | } -------------------------------------------------------------------------------- /Assets/Monads/ResultUnityExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using Object = UnityEngine.Object; 4 | 5 | namespace Monads 6 | { 7 | /// 8 | /// Provides extension methods for safely interacting with Unity's GameObject and Component system 9 | /// using Result monads to ensure null safety and clean error handling. 10 | /// 11 | /// These methods operate on a Result of GameObject (not GameObject directly), treating the GameObject 12 | /// as an Option-like monad that can either succeed or fail. 13 | /// 14 | /// This approach allows for garbage-free null checks and chaining operations in a fluent style. 15 | /// 16 | public static class ResultUnityExtensions 17 | { 18 | /// 19 | /// Safely retrieves a component of type TComponent from a Result of GameObject. 20 | /// 21 | /// If the Result represents a failure or the component is not found, a NotFound failure is returned. 22 | /// 23 | /// The type of Component to retrieve. 24 | /// The Result of GameObject to retrieve the component from. 25 | /// 26 | /// A Result containing the component if found, or a NotFound failure if the component is missing. 27 | /// 28 | [GarbageFree] 29 | public static Result GetSafeComponent( 30 | this Result source) where TComponent : Object 31 | => source.IsSuccess 32 | ? source.SuccessValue.GetComponent().ToResult() // Converts to Result 33 | : NotFound.Failure; // Propagate a NotFound failure if the source is already a failure 34 | 35 | /// 36 | /// Safely retrieves a component of type TComponent from the children of a Result of GameObject. 37 | /// 38 | /// If the Result represents a failure or the component is not found, a NotFound failure is returned. 39 | /// 40 | /// The type of Component to retrieve. 41 | /// The Result of GameObject to search in its children. 42 | /// 43 | /// A Result containing the component if found, or a NotFound failure if the component is missing. 44 | /// 45 | [GarbageFree] 46 | public static Result GetSafeComponentInChildren( 47 | this Result source) where TComponent : Object 48 | => source.IsSuccess 49 | ? source.SuccessValue.GetComponentInChildren().ToResult() 50 | : NotFound.Failure; 51 | 52 | /// 53 | /// Executes an action on a safe component of type TComponent, if it exists. 54 | /// 55 | /// This method combines searching for a component on the GameObject itself and in its children. 56 | /// If the component is found, the provided action is executed. 57 | /// 58 | /// The type of Component to retrieve. 59 | /// The Result of GameObject to search for the component. 60 | /// The action to execute on the retrieved component. 61 | /// 62 | /// The original Result of GameObject. If the component is not found, the result is unchanged. 63 | /// 64 | [GarbageFree] 65 | public static Result WithSafeComponent( 66 | this Result source, 67 | Action action) where TComponent : Object 68 | { 69 | if (source.IsFailure) 70 | return source; // Return early if the source Result is already a failure 71 | 72 | // Try to get the component directly 73 | var component = source.GetSafeComponent(); 74 | 75 | // If the component is not found, look in the children 76 | if (!component) 77 | component = source.GetSafeComponentInChildren(); 78 | 79 | // If the component exists, execute the provided action 80 | if (component) 81 | action(component.SuccessValue); 82 | 83 | return source; // Return the original Result of GameObject for fluent chaining 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /Assets/Prefabs/Cheese.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &4945226891110177653 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 1561628380513357843} 12 | - component: {fileID: 4072410161178734689} 13 | m_Layer: 0 14 | m_Name: Cheese 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &1561628380513357843 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 4945226891110177653} 27 | serializedVersion: 2 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: -2.8102164, y: 3.322713, z: 0} 30 | m_LocalScale: {x: 1, y: 1, z: 1} 31 | m_ConstrainProportionsScale: 0 32 | m_Children: [] 33 | m_Father: {fileID: 0} 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!212 &4072410161178734689 36 | SpriteRenderer: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 4945226891110177653} 42 | m_Enabled: 1 43 | m_CastShadows: 0 44 | m_ReceiveShadows: 0 45 | m_DynamicOccludee: 1 46 | m_StaticShadowCaster: 0 47 | m_MotionVectors: 1 48 | m_LightProbeUsage: 1 49 | m_ReflectionProbeUsage: 1 50 | m_RayTracingMode: 0 51 | m_RayTraceProcedural: 0 52 | m_RayTracingAccelStructBuildFlagsOverride: 0 53 | m_RayTracingAccelStructBuildFlags: 1 54 | m_SmallMeshCulling: 1 55 | m_RenderingLayerMask: 1 56 | m_RendererPriority: 0 57 | m_Materials: 58 | - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} 59 | m_StaticBatchInfo: 60 | firstSubMesh: 0 61 | subMeshCount: 0 62 | m_StaticBatchRoot: {fileID: 0} 63 | m_ProbeAnchor: {fileID: 0} 64 | m_LightProbeVolumeOverride: {fileID: 0} 65 | m_ScaleInLightmap: 1 66 | m_ReceiveGI: 1 67 | m_PreserveUVs: 0 68 | m_IgnoreNormalsForChartDetection: 0 69 | m_ImportantGI: 0 70 | m_StitchLightmapSeams: 1 71 | m_SelectedEditorRenderState: 0 72 | m_MinimumChartSize: 4 73 | m_AutoUVMaxDistance: 0.5 74 | m_AutoUVMaxAngle: 89 75 | m_LightmapParameters: {fileID: 0} 76 | m_SortingLayerID: 0 77 | m_SortingLayer: 0 78 | m_SortingOrder: 0 79 | m_Sprite: {fileID: -37317017, guid: 4d360a5b808266b43ab2ea1b1c130aa8, type: 3} 80 | m_Color: {r: 1, g: 1, b: 1, a: 1} 81 | m_FlipX: 0 82 | m_FlipY: 0 83 | m_DrawMode: 0 84 | m_Size: {x: 1, y: 1} 85 | m_AdaptiveModeThreshold: 0.5 86 | m_SpriteTileMode: 0 87 | m_WasSpriteAssigned: 1 88 | m_MaskInteraction: 0 89 | m_SpriteSortPoint: 0 90 | -------------------------------------------------------------------------------- /Assets/Prefabs/Coin.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &8964940431143094672 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 6876335856082153187} 12 | - component: {fileID: 7510648745240913251} 13 | - component: {fileID: 2061954725582737652} 14 | - component: {fileID: 7899605357857325359} 15 | m_Layer: 0 16 | m_Name: Coin 17 | m_TagString: Untagged 18 | m_Icon: {fileID: 0} 19 | m_NavMeshLayer: 0 20 | m_StaticEditorFlags: 0 21 | m_IsActive: 1 22 | --- !u!4 &6876335856082153187 23 | Transform: 24 | m_ObjectHideFlags: 0 25 | m_CorrespondingSourceObject: {fileID: 0} 26 | m_PrefabInstance: {fileID: 0} 27 | m_PrefabAsset: {fileID: 0} 28 | m_GameObject: {fileID: 8964940431143094672} 29 | serializedVersion: 2 30 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 31 | m_LocalPosition: {x: 0, y: 0, z: 0} 32 | m_LocalScale: {x: 1, y: 1, z: 1} 33 | m_ConstrainProportionsScale: 0 34 | m_Children: [] 35 | m_Father: {fileID: 0} 36 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 37 | --- !u!212 &7510648745240913251 38 | SpriteRenderer: 39 | m_ObjectHideFlags: 0 40 | m_CorrespondingSourceObject: {fileID: 0} 41 | m_PrefabInstance: {fileID: 0} 42 | m_PrefabAsset: {fileID: 0} 43 | m_GameObject: {fileID: 8964940431143094672} 44 | m_Enabled: 1 45 | m_CastShadows: 0 46 | m_ReceiveShadows: 0 47 | m_DynamicOccludee: 1 48 | m_StaticShadowCaster: 0 49 | m_MotionVectors: 1 50 | m_LightProbeUsage: 1 51 | m_ReflectionProbeUsage: 1 52 | m_RayTracingMode: 0 53 | m_RayTraceProcedural: 0 54 | m_RayTracingAccelStructBuildFlagsOverride: 0 55 | m_RayTracingAccelStructBuildFlags: 1 56 | m_SmallMeshCulling: 1 57 | m_RenderingLayerMask: 1 58 | m_RendererPriority: 0 59 | m_Materials: 60 | - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} 61 | m_StaticBatchInfo: 62 | firstSubMesh: 0 63 | subMeshCount: 0 64 | m_StaticBatchRoot: {fileID: 0} 65 | m_ProbeAnchor: {fileID: 0} 66 | m_LightProbeVolumeOverride: {fileID: 0} 67 | m_ScaleInLightmap: 1 68 | m_ReceiveGI: 1 69 | m_PreserveUVs: 0 70 | m_IgnoreNormalsForChartDetection: 0 71 | m_ImportantGI: 0 72 | m_StitchLightmapSeams: 1 73 | m_SelectedEditorRenderState: 0 74 | m_MinimumChartSize: 4 75 | m_AutoUVMaxDistance: 0.5 76 | m_AutoUVMaxAngle: 89 77 | m_LightmapParameters: {fileID: 0} 78 | m_SortingLayerID: 0 79 | m_SortingLayer: 0 80 | m_SortingOrder: 0 81 | m_Sprite: {fileID: 1962301605, guid: 4d360a5b808266b43ab2ea1b1c130aa8, type: 3} 82 | m_Color: {r: 1, g: 0.83862823, b: 0, a: 1} 83 | m_FlipX: 0 84 | m_FlipY: 0 85 | m_DrawMode: 0 86 | m_Size: {x: 1, y: 1} 87 | m_AdaptiveModeThreshold: 0.5 88 | m_SpriteTileMode: 0 89 | m_WasSpriteAssigned: 1 90 | m_MaskInteraction: 0 91 | m_SpriteSortPoint: 0 92 | --- !u!114 &2061954725582737652 93 | MonoBehaviour: 94 | m_ObjectHideFlags: 0 95 | m_CorrespondingSourceObject: {fileID: 0} 96 | m_PrefabInstance: {fileID: 0} 97 | m_PrefabAsset: {fileID: 0} 98 | m_GameObject: {fileID: 8964940431143094672} 99 | m_Enabled: 1 100 | m_EditorHideFlags: 0 101 | m_Script: {fileID: 11500000, guid: 2d2a1178e09b3c2488a5ed618debef43, type: 3} 102 | m_Name: 103 | m_EditorClassIdentifier: 104 | Score: 50 105 | Gold: 1 106 | --- !u!114 &7899605357857325359 107 | MonoBehaviour: 108 | m_ObjectHideFlags: 0 109 | m_CorrespondingSourceObject: {fileID: 0} 110 | m_PrefabInstance: {fileID: 0} 111 | m_PrefabAsset: {fileID: 0} 112 | m_GameObject: {fileID: 8964940431143094672} 113 | m_Enabled: 1 114 | m_EditorHideFlags: 0 115 | m_Script: {fileID: 11500000, guid: 976669ff87e06424a84c95b8b2cbe6d6, type: 3} 116 | m_Name: 117 | m_EditorClassIdentifier: 118 | Name: Coin 119 | -------------------------------------------------------------------------------- /Assets/Prefabs/Door-Locked.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &5297228607985025337 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 1052327391868351151} 12 | - component: {fileID: 3361231079386137855} 13 | m_Layer: 0 14 | m_Name: Door-Locked 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &1052327391868351151 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 5297228607985025337} 27 | serializedVersion: 2 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: 12.814169, y: 1.177757, z: 0} 30 | m_LocalScale: {x: 1, y: 1, z: 1} 31 | m_ConstrainProportionsScale: 0 32 | m_Children: [] 33 | m_Father: {fileID: 0} 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!212 &3361231079386137855 36 | SpriteRenderer: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 5297228607985025337} 42 | m_Enabled: 1 43 | m_CastShadows: 0 44 | m_ReceiveShadows: 0 45 | m_DynamicOccludee: 1 46 | m_StaticShadowCaster: 0 47 | m_MotionVectors: 1 48 | m_LightProbeUsage: 1 49 | m_ReflectionProbeUsage: 1 50 | m_RayTracingMode: 0 51 | m_RayTraceProcedural: 0 52 | m_RayTracingAccelStructBuildFlagsOverride: 0 53 | m_RayTracingAccelStructBuildFlags: 1 54 | m_SmallMeshCulling: 1 55 | m_RenderingLayerMask: 1 56 | m_RendererPriority: 0 57 | m_Materials: 58 | - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} 59 | m_StaticBatchInfo: 60 | firstSubMesh: 0 61 | subMeshCount: 0 62 | m_StaticBatchRoot: {fileID: 0} 63 | m_ProbeAnchor: {fileID: 0} 64 | m_LightProbeVolumeOverride: {fileID: 0} 65 | m_ScaleInLightmap: 1 66 | m_ReceiveGI: 1 67 | m_PreserveUVs: 0 68 | m_IgnoreNormalsForChartDetection: 0 69 | m_ImportantGI: 0 70 | m_StitchLightmapSeams: 1 71 | m_SelectedEditorRenderState: 0 72 | m_MinimumChartSize: 4 73 | m_AutoUVMaxDistance: 0.5 74 | m_AutoUVMaxAngle: 89 75 | m_LightmapParameters: {fileID: 0} 76 | m_SortingLayerID: 0 77 | m_SortingLayer: 0 78 | m_SortingOrder: 0 79 | m_Sprite: {fileID: 1346264636, guid: 4d360a5b808266b43ab2ea1b1c130aa8, type: 3} 80 | m_Color: {r: 1, g: 1, b: 1, a: 1} 81 | m_FlipX: 0 82 | m_FlipY: 0 83 | m_DrawMode: 0 84 | m_Size: {x: 1, y: 1} 85 | m_AdaptiveModeThreshold: 0.5 86 | m_SpriteTileMode: 0 87 | m_WasSpriteAssigned: 1 88 | m_MaskInteraction: 0 89 | m_SpriteSortPoint: 0 90 | -------------------------------------------------------------------------------- /Assets/Prefabs/Firebolt.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &5035023265864061181 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 5769995721086094163} 12 | - component: {fileID: 2652152155068111433} 13 | m_Layer: 0 14 | m_Name: Firebolt 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &5769995721086094163 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 5035023265864061181} 27 | serializedVersion: 2 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: -5.66129, y: 4.2517138, z: 0} 30 | m_LocalScale: {x: 1, y: 1, z: 1} 31 | m_ConstrainProportionsScale: 0 32 | m_Children: [] 33 | m_Father: {fileID: 0} 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!212 &2652152155068111433 36 | SpriteRenderer: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 5035023265864061181} 42 | m_Enabled: 1 43 | m_CastShadows: 0 44 | m_ReceiveShadows: 0 45 | m_DynamicOccludee: 1 46 | m_StaticShadowCaster: 0 47 | m_MotionVectors: 1 48 | m_LightProbeUsage: 1 49 | m_ReflectionProbeUsage: 1 50 | m_RayTracingMode: 0 51 | m_RayTraceProcedural: 0 52 | m_RayTracingAccelStructBuildFlagsOverride: 0 53 | m_RayTracingAccelStructBuildFlags: 1 54 | m_SmallMeshCulling: 1 55 | m_RenderingLayerMask: 1 56 | m_RendererPriority: 0 57 | m_Materials: 58 | - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} 59 | m_StaticBatchInfo: 60 | firstSubMesh: 0 61 | subMeshCount: 0 62 | m_StaticBatchRoot: {fileID: 0} 63 | m_ProbeAnchor: {fileID: 0} 64 | m_LightProbeVolumeOverride: {fileID: 0} 65 | m_ScaleInLightmap: 1 66 | m_ReceiveGI: 1 67 | m_PreserveUVs: 0 68 | m_IgnoreNormalsForChartDetection: 0 69 | m_ImportantGI: 0 70 | m_StitchLightmapSeams: 1 71 | m_SelectedEditorRenderState: 0 72 | m_MinimumChartSize: 4 73 | m_AutoUVMaxDistance: 0.5 74 | m_AutoUVMaxAngle: 89 75 | m_LightmapParameters: {fileID: 0} 76 | m_SortingLayerID: 0 77 | m_SortingLayer: 0 78 | m_SortingOrder: 0 79 | m_Sprite: {fileID: 326965891, guid: 4d360a5b808266b43ab2ea1b1c130aa8, type: 3} 80 | m_Color: {r: 1, g: 1, b: 1, a: 1} 81 | m_FlipX: 0 82 | m_FlipY: 0 83 | m_DrawMode: 0 84 | m_Size: {x: 1, y: 1} 85 | m_AdaptiveModeThreshold: 0.5 86 | m_SpriteTileMode: 0 87 | m_WasSpriteAssigned: 1 88 | m_MaskInteraction: 0 89 | m_SpriteSortPoint: 0 90 | -------------------------------------------------------------------------------- /Assets/Prefabs/Flag.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &8435060273706386592 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 3090539332980326640} 12 | - component: {fileID: 3278554969790146324} 13 | m_Layer: 0 14 | m_Name: Flag 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &3090539332980326640 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 8435060273706386592} 27 | serializedVersion: 2 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: 16.619425, y: 1.2200377, z: 0} 30 | m_LocalScale: {x: 1, y: 1, z: 1} 31 | m_ConstrainProportionsScale: 0 32 | m_Children: [] 33 | m_Father: {fileID: 0} 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!212 &3278554969790146324 36 | SpriteRenderer: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 8435060273706386592} 42 | m_Enabled: 1 43 | m_CastShadows: 0 44 | m_ReceiveShadows: 0 45 | m_DynamicOccludee: 1 46 | m_StaticShadowCaster: 0 47 | m_MotionVectors: 1 48 | m_LightProbeUsage: 1 49 | m_ReflectionProbeUsage: 1 50 | m_RayTracingMode: 0 51 | m_RayTraceProcedural: 0 52 | m_RayTracingAccelStructBuildFlagsOverride: 0 53 | m_RayTracingAccelStructBuildFlags: 1 54 | m_SmallMeshCulling: 1 55 | m_RenderingLayerMask: 1 56 | m_RendererPriority: 0 57 | m_Materials: 58 | - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} 59 | m_StaticBatchInfo: 60 | firstSubMesh: 0 61 | subMeshCount: 0 62 | m_StaticBatchRoot: {fileID: 0} 63 | m_ProbeAnchor: {fileID: 0} 64 | m_LightProbeVolumeOverride: {fileID: 0} 65 | m_ScaleInLightmap: 1 66 | m_ReceiveGI: 1 67 | m_PreserveUVs: 0 68 | m_IgnoreNormalsForChartDetection: 0 69 | m_ImportantGI: 0 70 | m_StitchLightmapSeams: 1 71 | m_SelectedEditorRenderState: 0 72 | m_MinimumChartSize: 4 73 | m_AutoUVMaxDistance: 0.5 74 | m_AutoUVMaxAngle: 89 75 | m_LightmapParameters: {fileID: 0} 76 | m_SortingLayerID: 0 77 | m_SortingLayer: 0 78 | m_SortingOrder: 0 79 | m_Sprite: {fileID: -1346915260, guid: 4d360a5b808266b43ab2ea1b1c130aa8, type: 3} 80 | m_Color: {r: 1, g: 1, b: 1, a: 1} 81 | m_FlipX: 0 82 | m_FlipY: 0 83 | m_DrawMode: 0 84 | m_Size: {x: 1, y: 1} 85 | m_AdaptiveModeThreshold: 0.5 86 | m_SpriteTileMode: 0 87 | m_WasSpriteAssigned: 1 88 | m_MaskInteraction: 0 89 | m_SpriteSortPoint: 0 90 | -------------------------------------------------------------------------------- /Assets/Prefabs/GameArea.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 67800cad54ea492ea8debf8d7fb74514, type: 3} 13 | m_Name: GameArea 14 | m_EditorClassIdentifier: 15 | Area: 16 | x: -16 17 | y: -8 18 | width: 32 19 | height: 14 20 | ShowGizmo: 1 21 | -------------------------------------------------------------------------------- /Assets/Prefabs/GarbageFreeSquare.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &8542420752844028328 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 5326194416169588255} 12 | - component: {fileID: 3808421776389765223} 13 | - component: {fileID: 1940540501877266402} 14 | m_Layer: 0 15 | m_Name: GarbageFreeSquare 16 | m_TagString: Untagged 17 | m_Icon: {fileID: 0} 18 | m_NavMeshLayer: 0 19 | m_StaticEditorFlags: 0 20 | m_IsActive: 1 21 | --- !u!4 &5326194416169588255 22 | Transform: 23 | m_ObjectHideFlags: 0 24 | m_CorrespondingSourceObject: {fileID: 0} 25 | m_PrefabInstance: {fileID: 0} 26 | m_PrefabAsset: {fileID: 0} 27 | m_GameObject: {fileID: 8542420752844028328} 28 | serializedVersion: 2 29 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 30 | m_LocalPosition: {x: 2, y: 0, z: 0} 31 | m_LocalScale: {x: 1, y: 1, z: 1} 32 | m_ConstrainProportionsScale: 0 33 | m_Children: [] 34 | m_Father: {fileID: 0} 35 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 36 | --- !u!114 &3808421776389765223 37 | MonoBehaviour: 38 | m_ObjectHideFlags: 0 39 | m_CorrespondingSourceObject: {fileID: 0} 40 | m_PrefabInstance: {fileID: 0} 41 | m_PrefabAsset: {fileID: 0} 42 | m_GameObject: {fileID: 8542420752844028328} 43 | m_Enabled: 1 44 | m_EditorHideFlags: 0 45 | m_Script: {fileID: 11500000, guid: 3d5406089b9f261499fea80ab112a33f, type: 3} 46 | m_Name: 47 | m_EditorClassIdentifier: 48 | initBoxCollider2D: {fileID: 0} 49 | --- !u!212 &1940540501877266402 50 | SpriteRenderer: 51 | m_ObjectHideFlags: 0 52 | m_CorrespondingSourceObject: {fileID: 0} 53 | m_PrefabInstance: {fileID: 0} 54 | m_PrefabAsset: {fileID: 0} 55 | m_GameObject: {fileID: 8542420752844028328} 56 | m_Enabled: 1 57 | m_CastShadows: 0 58 | m_ReceiveShadows: 0 59 | m_DynamicOccludee: 1 60 | m_StaticShadowCaster: 0 61 | m_MotionVectors: 1 62 | m_LightProbeUsage: 1 63 | m_ReflectionProbeUsage: 1 64 | m_RayTracingMode: 0 65 | m_RayTraceProcedural: 0 66 | m_RayTracingAccelStructBuildFlagsOverride: 0 67 | m_RayTracingAccelStructBuildFlags: 1 68 | m_SmallMeshCulling: 1 69 | m_RenderingLayerMask: 1 70 | m_RendererPriority: 0 71 | m_Materials: 72 | - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} 73 | m_StaticBatchInfo: 74 | firstSubMesh: 0 75 | subMeshCount: 0 76 | m_StaticBatchRoot: {fileID: 0} 77 | m_ProbeAnchor: {fileID: 0} 78 | m_LightProbeVolumeOverride: {fileID: 0} 79 | m_ScaleInLightmap: 1 80 | m_ReceiveGI: 1 81 | m_PreserveUVs: 0 82 | m_IgnoreNormalsForChartDetection: 0 83 | m_ImportantGI: 0 84 | m_StitchLightmapSeams: 1 85 | m_SelectedEditorRenderState: 0 86 | m_MinimumChartSize: 4 87 | m_AutoUVMaxDistance: 0.5 88 | m_AutoUVMaxAngle: 89 89 | m_LightmapParameters: {fileID: 0} 90 | m_SortingLayerID: 0 91 | m_SortingLayer: 0 92 | m_SortingOrder: 0 93 | m_Sprite: {fileID: 7482667652216324306, guid: c78aa1b25ea2f604bafc62ee6345fa40, type: 3} 94 | m_Color: {r: 1, g: 1, b: 1, a: 1} 95 | m_FlipX: 0 96 | m_FlipY: 0 97 | m_DrawMode: 0 98 | m_Size: {x: 1, y: 1} 99 | m_AdaptiveModeThreshold: 0.5 100 | m_SpriteTileMode: 0 101 | m_WasSpriteAssigned: 1 102 | m_MaskInteraction: 0 103 | m_SpriteSortPoint: 0 104 | -------------------------------------------------------------------------------- /Assets/Prefabs/Goblin.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &8974817956398496003 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 7352667978498713744} 12 | - component: {fileID: 9087752474789550080} 13 | - component: {fileID: 1905851903981266329} 14 | - component: {fileID: 2446720647529248103} 15 | m_Layer: 0 16 | m_Name: Goblin 17 | m_TagString: Untagged 18 | m_Icon: {fileID: 0} 19 | m_NavMeshLayer: 0 20 | m_StaticEditorFlags: 0 21 | m_IsActive: 1 22 | --- !u!4 &7352667978498713744 23 | Transform: 24 | m_ObjectHideFlags: 0 25 | m_CorrespondingSourceObject: {fileID: 0} 26 | m_PrefabInstance: {fileID: 0} 27 | m_PrefabAsset: {fileID: 0} 28 | m_GameObject: {fileID: 8974817956398496003} 29 | serializedVersion: 2 30 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 31 | m_LocalPosition: {x: 0, y: 0, z: 0} 32 | m_LocalScale: {x: 1, y: 1, z: 1} 33 | m_ConstrainProportionsScale: 0 34 | m_Children: [] 35 | m_Father: {fileID: 0} 36 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 37 | --- !u!114 &9087752474789550080 38 | MonoBehaviour: 39 | m_ObjectHideFlags: 0 40 | m_CorrespondingSourceObject: {fileID: 0} 41 | m_PrefabInstance: {fileID: 0} 42 | m_PrefabAsset: {fileID: 0} 43 | m_GameObject: {fileID: 8974817956398496003} 44 | m_Enabled: 1 45 | m_EditorHideFlags: 0 46 | m_Script: {fileID: 11500000, guid: 740858d989029ec4a9386df37209207a, type: 3} 47 | m_Name: 48 | m_EditorClassIdentifier: 49 | ActionPoints: 0 50 | --- !u!212 &1905851903981266329 51 | SpriteRenderer: 52 | m_ObjectHideFlags: 0 53 | m_CorrespondingSourceObject: {fileID: 0} 54 | m_PrefabInstance: {fileID: 0} 55 | m_PrefabAsset: {fileID: 0} 56 | m_GameObject: {fileID: 8974817956398496003} 57 | m_Enabled: 1 58 | m_CastShadows: 0 59 | m_ReceiveShadows: 0 60 | m_DynamicOccludee: 1 61 | m_StaticShadowCaster: 0 62 | m_MotionVectors: 1 63 | m_LightProbeUsage: 1 64 | m_ReflectionProbeUsage: 1 65 | m_RayTracingMode: 0 66 | m_RayTraceProcedural: 0 67 | m_RayTracingAccelStructBuildFlagsOverride: 0 68 | m_RayTracingAccelStructBuildFlags: 1 69 | m_SmallMeshCulling: 1 70 | m_RenderingLayerMask: 1 71 | m_RendererPriority: 0 72 | m_Materials: 73 | - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} 74 | m_StaticBatchInfo: 75 | firstSubMesh: 0 76 | subMeshCount: 0 77 | m_StaticBatchRoot: {fileID: 0} 78 | m_ProbeAnchor: {fileID: 0} 79 | m_LightProbeVolumeOverride: {fileID: 0} 80 | m_ScaleInLightmap: 1 81 | m_ReceiveGI: 1 82 | m_PreserveUVs: 0 83 | m_IgnoreNormalsForChartDetection: 0 84 | m_ImportantGI: 0 85 | m_StitchLightmapSeams: 1 86 | m_SelectedEditorRenderState: 0 87 | m_MinimumChartSize: 4 88 | m_AutoUVMaxDistance: 0.5 89 | m_AutoUVMaxAngle: 89 90 | m_LightmapParameters: {fileID: 0} 91 | m_SortingLayerID: 0 92 | m_SortingLayer: 0 93 | m_SortingOrder: 0 94 | m_Sprite: {fileID: 932919448, guid: 4d360a5b808266b43ab2ea1b1c130aa8, type: 3} 95 | m_Color: {r: 0.27157944, g: 0.5471698, b: 0.27014354, a: 1} 96 | m_FlipX: 0 97 | m_FlipY: 0 98 | m_DrawMode: 0 99 | m_Size: {x: 1, y: 1} 100 | m_AdaptiveModeThreshold: 0.5 101 | m_SpriteTileMode: 0 102 | m_WasSpriteAssigned: 1 103 | m_MaskInteraction: 0 104 | m_SpriteSortPoint: 0 105 | --- !u!114 &2446720647529248103 106 | MonoBehaviour: 107 | m_ObjectHideFlags: 0 108 | m_CorrespondingSourceObject: {fileID: 0} 109 | m_PrefabInstance: {fileID: 0} 110 | m_PrefabAsset: {fileID: 0} 111 | m_GameObject: {fileID: 8974817956398496003} 112 | m_Enabled: 1 113 | m_EditorHideFlags: 0 114 | m_Script: {fileID: 11500000, guid: 976669ff87e06424a84c95b8b2cbe6d6, type: 3} 115 | m_Name: 116 | m_EditorClassIdentifier: 117 | Name: Goblin 118 | -------------------------------------------------------------------------------- /Assets/Prefabs/GreenSquare.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &8322473094165022716 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 7502692804070824989} 12 | - component: {fileID: 4331048489145763327} 13 | m_Layer: 0 14 | m_Name: GreenSquare 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &7502692804070824989 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 8322473094165022716} 27 | serializedVersion: 2 28 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 29 | m_LocalPosition: {x: 0, y: 0, z: 0} 30 | m_LocalScale: {x: 1, y: 1, z: 1} 31 | m_ConstrainProportionsScale: 0 32 | m_Children: [] 33 | m_Father: {fileID: 0} 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!212 &4331048489145763327 36 | SpriteRenderer: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 8322473094165022716} 42 | m_Enabled: 1 43 | m_CastShadows: 0 44 | m_ReceiveShadows: 0 45 | m_DynamicOccludee: 1 46 | m_StaticShadowCaster: 0 47 | m_MotionVectors: 1 48 | m_LightProbeUsage: 1 49 | m_ReflectionProbeUsage: 1 50 | m_RayTracingMode: 0 51 | m_RayTraceProcedural: 0 52 | m_RayTracingAccelStructBuildFlagsOverride: 0 53 | m_RayTracingAccelStructBuildFlags: 1 54 | m_SmallMeshCulling: 1 55 | m_RenderingLayerMask: 1 56 | m_RendererPriority: 0 57 | m_Materials: 58 | - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} 59 | m_StaticBatchInfo: 60 | firstSubMesh: 0 61 | subMeshCount: 0 62 | m_StaticBatchRoot: {fileID: 0} 63 | m_ProbeAnchor: {fileID: 0} 64 | m_LightProbeVolumeOverride: {fileID: 0} 65 | m_ScaleInLightmap: 1 66 | m_ReceiveGI: 1 67 | m_PreserveUVs: 0 68 | m_IgnoreNormalsForChartDetection: 0 69 | m_ImportantGI: 0 70 | m_StitchLightmapSeams: 1 71 | m_SelectedEditorRenderState: 0 72 | m_MinimumChartSize: 4 73 | m_AutoUVMaxDistance: 0.5 74 | m_AutoUVMaxAngle: 89 75 | m_LightmapParameters: {fileID: 0} 76 | m_SortingLayerID: 0 77 | m_SortingLayer: 0 78 | m_SortingOrder: 0 79 | m_Sprite: {fileID: 7482667652216324306, guid: c78aa1b25ea2f604bafc62ee6345fa40, type: 3} 80 | m_Color: {r: 1, g: 1, b: 1, a: 1} 81 | m_FlipX: 0 82 | m_FlipY: 0 83 | m_DrawMode: 0 84 | m_Size: {x: 1, y: 1} 85 | m_AdaptiveModeThreshold: 0.5 86 | m_SpriteTileMode: 0 87 | m_WasSpriteAssigned: 1 88 | m_MaskInteraction: 0 89 | m_SpriteSortPoint: 0 90 | -------------------------------------------------------------------------------- /Assets/Prefabs/Heart-Empty.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &7834439349375983072 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 7354634127096012587} 12 | - component: {fileID: 483151566836181025} 13 | m_Layer: 0 14 | m_Name: Heart-Empty 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &7354634127096012587 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 7834439349375983072} 27 | serializedVersion: 2 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: 0, y: 0, z: 0} 30 | m_LocalScale: {x: 1, y: 1, z: 1} 31 | m_ConstrainProportionsScale: 0 32 | m_Children: [] 33 | m_Father: {fileID: 0} 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!212 &483151566836181025 36 | SpriteRenderer: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 7834439349375983072} 42 | m_Enabled: 1 43 | m_CastShadows: 0 44 | m_ReceiveShadows: 0 45 | m_DynamicOccludee: 1 46 | m_StaticShadowCaster: 0 47 | m_MotionVectors: 1 48 | m_LightProbeUsage: 1 49 | m_ReflectionProbeUsage: 1 50 | m_RayTracingMode: 0 51 | m_RayTraceProcedural: 0 52 | m_RayTracingAccelStructBuildFlagsOverride: 0 53 | m_RayTracingAccelStructBuildFlags: 1 54 | m_SmallMeshCulling: 1 55 | m_RenderingLayerMask: 1 56 | m_RendererPriority: 0 57 | m_Materials: 58 | - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} 59 | m_StaticBatchInfo: 60 | firstSubMesh: 0 61 | subMeshCount: 0 62 | m_StaticBatchRoot: {fileID: 0} 63 | m_ProbeAnchor: {fileID: 0} 64 | m_LightProbeVolumeOverride: {fileID: 0} 65 | m_ScaleInLightmap: 1 66 | m_ReceiveGI: 1 67 | m_PreserveUVs: 0 68 | m_IgnoreNormalsForChartDetection: 0 69 | m_ImportantGI: 0 70 | m_StitchLightmapSeams: 1 71 | m_SelectedEditorRenderState: 0 72 | m_MinimumChartSize: 4 73 | m_AutoUVMaxDistance: 0.5 74 | m_AutoUVMaxAngle: 89 75 | m_LightmapParameters: {fileID: 0} 76 | m_SortingLayerID: 0 77 | m_SortingLayer: 0 78 | m_SortingOrder: 0 79 | m_Sprite: {fileID: 1931088953, guid: 4d360a5b808266b43ab2ea1b1c130aa8, type: 3} 80 | m_Color: {r: 1, g: 1, b: 1, a: 1} 81 | m_FlipX: 0 82 | m_FlipY: 0 83 | m_DrawMode: 0 84 | m_Size: {x: 1, y: 1} 85 | m_AdaptiveModeThreshold: 0.5 86 | m_SpriteTileMode: 0 87 | m_WasSpriteAssigned: 1 88 | m_MaskInteraction: 0 89 | m_SpriteSortPoint: 0 90 | -------------------------------------------------------------------------------- /Assets/Prefabs/Heart-Full.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &3941093582908230262 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 1008405201846367241} 12 | - component: {fileID: 1090738966429318247} 13 | m_Layer: 0 14 | m_Name: Heart-Full 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &1008405201846367241 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 3941093582908230262} 27 | serializedVersion: 2 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: 0, y: 0, z: 0} 30 | m_LocalScale: {x: 1, y: 1, z: 1} 31 | m_ConstrainProportionsScale: 0 32 | m_Children: [] 33 | m_Father: {fileID: 0} 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!212 &1090738966429318247 36 | SpriteRenderer: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 3941093582908230262} 42 | m_Enabled: 1 43 | m_CastShadows: 0 44 | m_ReceiveShadows: 0 45 | m_DynamicOccludee: 1 46 | m_StaticShadowCaster: 0 47 | m_MotionVectors: 1 48 | m_LightProbeUsage: 1 49 | m_ReflectionProbeUsage: 1 50 | m_RayTracingMode: 0 51 | m_RayTraceProcedural: 0 52 | m_RayTracingAccelStructBuildFlagsOverride: 0 53 | m_RayTracingAccelStructBuildFlags: 1 54 | m_SmallMeshCulling: 1 55 | m_RenderingLayerMask: 1 56 | m_RendererPriority: 0 57 | m_Materials: 58 | - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} 59 | m_StaticBatchInfo: 60 | firstSubMesh: 0 61 | subMeshCount: 0 62 | m_StaticBatchRoot: {fileID: 0} 63 | m_ProbeAnchor: {fileID: 0} 64 | m_LightProbeVolumeOverride: {fileID: 0} 65 | m_ScaleInLightmap: 1 66 | m_ReceiveGI: 1 67 | m_PreserveUVs: 0 68 | m_IgnoreNormalsForChartDetection: 0 69 | m_ImportantGI: 0 70 | m_StitchLightmapSeams: 1 71 | m_SelectedEditorRenderState: 0 72 | m_MinimumChartSize: 4 73 | m_AutoUVMaxDistance: 0.5 74 | m_AutoUVMaxAngle: 89 75 | m_LightmapParameters: {fileID: 0} 76 | m_SortingLayerID: 0 77 | m_SortingLayer: 0 78 | m_SortingOrder: 0 79 | m_Sprite: {fileID: 1987823104, guid: 4d360a5b808266b43ab2ea1b1c130aa8, type: 3} 80 | m_Color: {r: 1, g: 0.5, b: 0.5, a: 1} 81 | m_FlipX: 0 82 | m_FlipY: 0 83 | m_DrawMode: 0 84 | m_Size: {x: 1, y: 1} 85 | m_AdaptiveModeThreshold: 0.5 86 | m_SpriteTileMode: 0 87 | m_WasSpriteAssigned: 1 88 | m_MaskInteraction: 0 89 | m_SpriteSortPoint: 0 90 | -------------------------------------------------------------------------------- /Assets/Prefabs/Heart-Half.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &386667784968976487 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 6363209963179336737} 12 | - component: {fileID: 464053744583494725} 13 | m_Layer: 0 14 | m_Name: Heart-Half 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &6363209963179336737 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 386667784968976487} 27 | serializedVersion: 2 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: 0, y: 0, z: 0} 30 | m_LocalScale: {x: 1, y: 1, z: 1} 31 | m_ConstrainProportionsScale: 0 32 | m_Children: [] 33 | m_Father: {fileID: 0} 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!212 &464053744583494725 36 | SpriteRenderer: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 386667784968976487} 42 | m_Enabled: 1 43 | m_CastShadows: 0 44 | m_ReceiveShadows: 0 45 | m_DynamicOccludee: 1 46 | m_StaticShadowCaster: 0 47 | m_MotionVectors: 1 48 | m_LightProbeUsage: 1 49 | m_ReflectionProbeUsage: 1 50 | m_RayTracingMode: 0 51 | m_RayTraceProcedural: 0 52 | m_RayTracingAccelStructBuildFlagsOverride: 0 53 | m_RayTracingAccelStructBuildFlags: 1 54 | m_SmallMeshCulling: 1 55 | m_RenderingLayerMask: 1 56 | m_RendererPriority: 0 57 | m_Materials: 58 | - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} 59 | m_StaticBatchInfo: 60 | firstSubMesh: 0 61 | subMeshCount: 0 62 | m_StaticBatchRoot: {fileID: 0} 63 | m_ProbeAnchor: {fileID: 0} 64 | m_LightProbeVolumeOverride: {fileID: 0} 65 | m_ScaleInLightmap: 1 66 | m_ReceiveGI: 1 67 | m_PreserveUVs: 0 68 | m_IgnoreNormalsForChartDetection: 0 69 | m_ImportantGI: 0 70 | m_StitchLightmapSeams: 1 71 | m_SelectedEditorRenderState: 0 72 | m_MinimumChartSize: 4 73 | m_AutoUVMaxDistance: 0.5 74 | m_AutoUVMaxAngle: 89 75 | m_LightmapParameters: {fileID: 0} 76 | m_SortingLayerID: 0 77 | m_SortingLayer: 0 78 | m_SortingOrder: 0 79 | m_Sprite: {fileID: 1731868043, guid: 4d360a5b808266b43ab2ea1b1c130aa8, type: 3} 80 | m_Color: {r: 1, g: 1, b: 1, a: 1} 81 | m_FlipX: 0 82 | m_FlipY: 0 83 | m_DrawMode: 0 84 | m_Size: {x: 1, y: 1} 85 | m_AdaptiveModeThreshold: 0.5 86 | m_SpriteTileMode: 0 87 | m_WasSpriteAssigned: 1 88 | m_MaskInteraction: 0 89 | m_SpriteSortPoint: 0 90 | -------------------------------------------------------------------------------- /Assets/Prefabs/Key.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &1135873298855433647 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 2925613771276361156} 12 | - component: {fileID: 7370479096822095547} 13 | m_Layer: 0 14 | m_Name: Key 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &2925613771276361156 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 1135873298855433647} 27 | serializedVersion: 2 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: 3.7408488, y: 7.006685, z: 0} 30 | m_LocalScale: {x: 1, y: 1, z: 1} 31 | m_ConstrainProportionsScale: 0 32 | m_Children: [] 33 | m_Father: {fileID: 0} 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!212 &7370479096822095547 36 | SpriteRenderer: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 1135873298855433647} 42 | m_Enabled: 1 43 | m_CastShadows: 0 44 | m_ReceiveShadows: 0 45 | m_DynamicOccludee: 1 46 | m_StaticShadowCaster: 0 47 | m_MotionVectors: 1 48 | m_LightProbeUsage: 1 49 | m_ReflectionProbeUsage: 1 50 | m_RayTracingMode: 0 51 | m_RayTraceProcedural: 0 52 | m_RayTracingAccelStructBuildFlagsOverride: 0 53 | m_RayTracingAccelStructBuildFlags: 1 54 | m_SmallMeshCulling: 1 55 | m_RenderingLayerMask: 1 56 | m_RendererPriority: 0 57 | m_Materials: 58 | - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} 59 | m_StaticBatchInfo: 60 | firstSubMesh: 0 61 | subMeshCount: 0 62 | m_StaticBatchRoot: {fileID: 0} 63 | m_ProbeAnchor: {fileID: 0} 64 | m_LightProbeVolumeOverride: {fileID: 0} 65 | m_ScaleInLightmap: 1 66 | m_ReceiveGI: 1 67 | m_PreserveUVs: 0 68 | m_IgnoreNormalsForChartDetection: 0 69 | m_ImportantGI: 0 70 | m_StitchLightmapSeams: 1 71 | m_SelectedEditorRenderState: 0 72 | m_MinimumChartSize: 4 73 | m_AutoUVMaxDistance: 0.5 74 | m_AutoUVMaxAngle: 89 75 | m_LightmapParameters: {fileID: 0} 76 | m_SortingLayerID: 0 77 | m_SortingLayer: 0 78 | m_SortingOrder: 0 79 | m_Sprite: {fileID: 1054774700, guid: 4d360a5b808266b43ab2ea1b1c130aa8, type: 3} 80 | m_Color: {r: 1, g: 1, b: 1, a: 1} 81 | m_FlipX: 0 82 | m_FlipY: 0 83 | m_DrawMode: 0 84 | m_Size: {x: 1, y: 1} 85 | m_AdaptiveModeThreshold: 0.5 86 | m_SpriteTileMode: 0 87 | m_WasSpriteAssigned: 1 88 | m_MaskInteraction: 0 89 | m_SpriteSortPoint: 0 90 | -------------------------------------------------------------------------------- /Assets/Prefabs/Main Camera.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &512041733440862047 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 4833380732991156189} 12 | - component: {fileID: 5258934380530973371} 13 | - component: {fileID: 2278265342921546539} 14 | - component: {fileID: 2874384662133493051} 15 | m_Layer: 0 16 | m_Name: Main Camera 17 | m_TagString: MainCamera 18 | m_Icon: {fileID: 0} 19 | m_NavMeshLayer: 0 20 | m_StaticEditorFlags: 0 21 | m_IsActive: 1 22 | --- !u!4 &4833380732991156189 23 | Transform: 24 | m_ObjectHideFlags: 0 25 | m_CorrespondingSourceObject: {fileID: 0} 26 | m_PrefabInstance: {fileID: 0} 27 | m_PrefabAsset: {fileID: 0} 28 | m_GameObject: {fileID: 512041733440862047} 29 | serializedVersion: 2 30 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 31 | m_LocalPosition: {x: 0, y: 0, z: -10} 32 | m_LocalScale: {x: 1, y: 1, z: 1} 33 | m_ConstrainProportionsScale: 0 34 | m_Children: [] 35 | m_Father: {fileID: 0} 36 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 37 | --- !u!20 &5258934380530973371 38 | Camera: 39 | m_ObjectHideFlags: 0 40 | m_CorrespondingSourceObject: {fileID: 0} 41 | m_PrefabInstance: {fileID: 0} 42 | m_PrefabAsset: {fileID: 0} 43 | m_GameObject: {fileID: 512041733440862047} 44 | m_Enabled: 1 45 | serializedVersion: 2 46 | m_ClearFlags: 2 47 | m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0} 48 | m_projectionMatrixMode: 1 49 | m_GateFitMode: 2 50 | m_FOVAxisMode: 0 51 | m_Iso: 200 52 | m_ShutterSpeed: 0.005 53 | m_Aperture: 16 54 | m_FocusDistance: 10 55 | m_FocalLength: 50 56 | m_BladeCount: 5 57 | m_Curvature: {x: 2, y: 11} 58 | m_BarrelClipping: 0.25 59 | m_Anamorphism: 0 60 | m_SensorSize: {x: 36, y: 24} 61 | m_LensShift: {x: 0, y: 0} 62 | m_NormalizedViewPortRect: 63 | serializedVersion: 2 64 | x: 0 65 | y: 0 66 | width: 1 67 | height: 1 68 | near clip plane: 0.3 69 | far clip plane: 1000 70 | field of view: 34 71 | orthographic: 1 72 | orthographic size: 10 73 | m_Depth: -1 74 | m_CullingMask: 75 | serializedVersion: 2 76 | m_Bits: 4294967295 77 | m_RenderingPath: -1 78 | m_TargetTexture: {fileID: 0} 79 | m_TargetDisplay: 0 80 | m_TargetEye: 0 81 | m_HDR: 1 82 | m_AllowMSAA: 0 83 | m_AllowDynamicResolution: 0 84 | m_ForceIntoRT: 0 85 | m_OcclusionCulling: 0 86 | m_StereoConvergence: 10 87 | m_StereoSeparation: 0.022 88 | --- !u!81 &2278265342921546539 89 | AudioListener: 90 | m_ObjectHideFlags: 0 91 | m_CorrespondingSourceObject: {fileID: 0} 92 | m_PrefabInstance: {fileID: 0} 93 | m_PrefabAsset: {fileID: 0} 94 | m_GameObject: {fileID: 512041733440862047} 95 | m_Enabled: 1 96 | --- !u!114 &2874384662133493051 97 | MonoBehaviour: 98 | m_ObjectHideFlags: 0 99 | m_CorrespondingSourceObject: {fileID: 0} 100 | m_PrefabInstance: {fileID: 0} 101 | m_PrefabAsset: {fileID: 0} 102 | m_GameObject: {fileID: 512041733440862047} 103 | m_Enabled: 1 104 | m_EditorHideFlags: 0 105 | m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} 106 | m_Name: 107 | m_EditorClassIdentifier: 108 | m_RenderShadows: 1 109 | m_RequiresDepthTextureOption: 2 110 | m_RequiresOpaqueTextureOption: 2 111 | m_CameraType: 0 112 | m_Cameras: [] 113 | m_RendererIndex: -1 114 | m_VolumeLayerMask: 115 | serializedVersion: 2 116 | m_Bits: 1 117 | m_VolumeTrigger: {fileID: 0} 118 | m_VolumeFrameworkUpdateModeOption: 2 119 | m_RenderPostProcessing: 0 120 | m_Antialiasing: 0 121 | m_AntialiasingQuality: 2 122 | m_StopNaN: 0 123 | m_Dithering: 0 124 | m_ClearDepth: 1 125 | m_AllowXRRendering: 1 126 | m_AllowHDROutput: 1 127 | m_UseScreenCoordOverride: 0 128 | m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} 129 | m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} 130 | m_RequiresDepthTexture: 0 131 | m_RequiresColorTexture: 0 132 | m_Version: 2 133 | m_TaaSettings: 134 | m_Quality: 3 135 | m_FrameInfluence: 0.1 136 | m_JitterScale: 1 137 | m_MipBias: 0 138 | m_VarianceClampScale: 0.9 139 | m_ContrastAdaptiveSharpening: 0 140 | -------------------------------------------------------------------------------- /Assets/Prefabs/Meat.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &6313678713314489553 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 6836286912402986413} 12 | - component: {fileID: 2799128418923610305} 13 | m_Layer: 0 14 | m_Name: Meat 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &6836286912402986413 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 6313678713314489553} 27 | serializedVersion: 2 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: -0.32753944, y: 3.5789883, z: 0} 30 | m_LocalScale: {x: 1, y: 1, z: 1} 31 | m_ConstrainProportionsScale: 0 32 | m_Children: [] 33 | m_Father: {fileID: 0} 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!212 &2799128418923610305 36 | SpriteRenderer: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 6313678713314489553} 42 | m_Enabled: 1 43 | m_CastShadows: 0 44 | m_ReceiveShadows: 0 45 | m_DynamicOccludee: 1 46 | m_StaticShadowCaster: 0 47 | m_MotionVectors: 1 48 | m_LightProbeUsage: 1 49 | m_ReflectionProbeUsage: 1 50 | m_RayTracingMode: 0 51 | m_RayTraceProcedural: 0 52 | m_RayTracingAccelStructBuildFlagsOverride: 0 53 | m_RayTracingAccelStructBuildFlags: 1 54 | m_SmallMeshCulling: 1 55 | m_RenderingLayerMask: 1 56 | m_RendererPriority: 0 57 | m_Materials: 58 | - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} 59 | m_StaticBatchInfo: 60 | firstSubMesh: 0 61 | subMeshCount: 0 62 | m_StaticBatchRoot: {fileID: 0} 63 | m_ProbeAnchor: {fileID: 0} 64 | m_LightProbeVolumeOverride: {fileID: 0} 65 | m_ScaleInLightmap: 1 66 | m_ReceiveGI: 1 67 | m_PreserveUVs: 0 68 | m_IgnoreNormalsForChartDetection: 0 69 | m_ImportantGI: 0 70 | m_StitchLightmapSeams: 1 71 | m_SelectedEditorRenderState: 0 72 | m_MinimumChartSize: 4 73 | m_AutoUVMaxDistance: 0.5 74 | m_AutoUVMaxAngle: 89 75 | m_LightmapParameters: {fileID: 0} 76 | m_SortingLayerID: 0 77 | m_SortingLayer: 0 78 | m_SortingOrder: 0 79 | m_Sprite: {fileID: -958856245, guid: 4d360a5b808266b43ab2ea1b1c130aa8, type: 3} 80 | m_Color: {r: 1, g: 1, b: 1, a: 1} 81 | m_FlipX: 0 82 | m_FlipY: 0 83 | m_DrawMode: 0 84 | m_Size: {x: 1, y: 1} 85 | m_AdaptiveModeThreshold: 0.5 86 | m_SpriteTileMode: 0 87 | m_WasSpriteAssigned: 1 88 | m_MaskInteraction: 0 89 | m_SpriteSortPoint: 0 90 | -------------------------------------------------------------------------------- /Assets/Prefabs/Outside-Wall.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &251199390365509747 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 5349399732260311030} 12 | - component: {fileID: 3632862573095757581} 13 | - component: {fileID: 5250126119650814419} 14 | - component: {fileID: 1429637278660818490} 15 | m_Layer: 0 16 | m_Name: Outside-Wall 17 | m_TagString: Untagged 18 | m_Icon: {fileID: 0} 19 | m_NavMeshLayer: 0 20 | m_StaticEditorFlags: 0 21 | m_IsActive: 1 22 | --- !u!4 &5349399732260311030 23 | Transform: 24 | m_ObjectHideFlags: 0 25 | m_CorrespondingSourceObject: {fileID: 0} 26 | m_PrefabInstance: {fileID: 0} 27 | m_PrefabAsset: {fileID: 0} 28 | m_GameObject: {fileID: 251199390365509747} 29 | serializedVersion: 2 30 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 31 | m_LocalPosition: {x: 0, y: 0, z: 0} 32 | m_LocalScale: {x: 1, y: 1, z: 1} 33 | m_ConstrainProportionsScale: 0 34 | m_Children: [] 35 | m_Father: {fileID: 0} 36 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 37 | --- !u!212 &3632862573095757581 38 | SpriteRenderer: 39 | m_ObjectHideFlags: 0 40 | m_CorrespondingSourceObject: {fileID: 0} 41 | m_PrefabInstance: {fileID: 0} 42 | m_PrefabAsset: {fileID: 0} 43 | m_GameObject: {fileID: 251199390365509747} 44 | m_Enabled: 1 45 | m_CastShadows: 0 46 | m_ReceiveShadows: 0 47 | m_DynamicOccludee: 1 48 | m_StaticShadowCaster: 0 49 | m_MotionVectors: 1 50 | m_LightProbeUsage: 1 51 | m_ReflectionProbeUsage: 1 52 | m_RayTracingMode: 0 53 | m_RayTraceProcedural: 0 54 | m_RayTracingAccelStructBuildFlagsOverride: 0 55 | m_RayTracingAccelStructBuildFlags: 1 56 | m_SmallMeshCulling: 1 57 | m_RenderingLayerMask: 1 58 | m_RendererPriority: 0 59 | m_Materials: 60 | - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} 61 | m_StaticBatchInfo: 62 | firstSubMesh: 0 63 | subMeshCount: 0 64 | m_StaticBatchRoot: {fileID: 0} 65 | m_ProbeAnchor: {fileID: 0} 66 | m_LightProbeVolumeOverride: {fileID: 0} 67 | m_ScaleInLightmap: 1 68 | m_ReceiveGI: 1 69 | m_PreserveUVs: 0 70 | m_IgnoreNormalsForChartDetection: 0 71 | m_ImportantGI: 0 72 | m_StitchLightmapSeams: 1 73 | m_SelectedEditorRenderState: 0 74 | m_MinimumChartSize: 4 75 | m_AutoUVMaxDistance: 0.5 76 | m_AutoUVMaxAngle: 89 77 | m_LightmapParameters: {fileID: 0} 78 | m_SortingLayerID: 0 79 | m_SortingLayer: 0 80 | m_SortingOrder: 0 81 | m_Sprite: {fileID: -704170882, guid: 4d360a5b808266b43ab2ea1b1c130aa8, type: 3} 82 | m_Color: {r: 0.4528302, g: 0.4528302, b: 0.4528302, a: 1} 83 | m_FlipX: 0 84 | m_FlipY: 0 85 | m_DrawMode: 0 86 | m_Size: {x: 0.16, y: 0.16} 87 | m_AdaptiveModeThreshold: 0.5 88 | m_SpriteTileMode: 0 89 | m_WasSpriteAssigned: 1 90 | m_MaskInteraction: 0 91 | m_SpriteSortPoint: 0 92 | --- !u!114 &5250126119650814419 93 | MonoBehaviour: 94 | m_ObjectHideFlags: 0 95 | m_CorrespondingSourceObject: {fileID: 0} 96 | m_PrefabInstance: {fileID: 0} 97 | m_PrefabAsset: {fileID: 0} 98 | m_GameObject: {fileID: 251199390365509747} 99 | m_Enabled: 1 100 | m_EditorHideFlags: 0 101 | m_Script: {fileID: 11500000, guid: d92abb184607e614e88db196c5fa4df5, type: 3} 102 | m_Name: 103 | m_EditorClassIdentifier: 104 | --- !u!114 &1429637278660818490 105 | MonoBehaviour: 106 | m_ObjectHideFlags: 0 107 | m_CorrespondingSourceObject: {fileID: 0} 108 | m_PrefabInstance: {fileID: 0} 109 | m_PrefabAsset: {fileID: 0} 110 | m_GameObject: {fileID: 251199390365509747} 111 | m_Enabled: 1 112 | m_EditorHideFlags: 0 113 | m_Script: {fileID: 11500000, guid: 976669ff87e06424a84c95b8b2cbe6d6, type: 3} 114 | m_Name: 115 | m_EditorClassIdentifier: 116 | Name: Wall 117 | -------------------------------------------------------------------------------- /Assets/Prefabs/Player.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &3607861744337957496 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 4517769113920549328} 12 | - component: {fileID: 1387178958812585995} 13 | m_Layer: 0 14 | m_Name: Player 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &4517769113920549328 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 3607861744337957496} 27 | serializedVersion: 2 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: 0, y: 1, z: 0} 30 | m_LocalScale: {x: 1, y: 1, z: 1} 31 | m_ConstrainProportionsScale: 0 32 | m_Children: [] 33 | m_Father: {fileID: 0} 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!212 &1387178958812585995 36 | SpriteRenderer: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 3607861744337957496} 42 | m_Enabled: 1 43 | m_CastShadows: 0 44 | m_ReceiveShadows: 0 45 | m_DynamicOccludee: 1 46 | m_StaticShadowCaster: 0 47 | m_MotionVectors: 1 48 | m_LightProbeUsage: 1 49 | m_ReflectionProbeUsage: 1 50 | m_RayTracingMode: 0 51 | m_RayTraceProcedural: 0 52 | m_RayTracingAccelStructBuildFlagsOverride: 0 53 | m_RayTracingAccelStructBuildFlags: 1 54 | m_SmallMeshCulling: 1 55 | m_RenderingLayerMask: 1 56 | m_RendererPriority: 0 57 | m_Materials: 58 | - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} 59 | m_StaticBatchInfo: 60 | firstSubMesh: 0 61 | subMeshCount: 0 62 | m_StaticBatchRoot: {fileID: 0} 63 | m_ProbeAnchor: {fileID: 0} 64 | m_LightProbeVolumeOverride: {fileID: 0} 65 | m_ScaleInLightmap: 1 66 | m_ReceiveGI: 1 67 | m_PreserveUVs: 0 68 | m_IgnoreNormalsForChartDetection: 0 69 | m_ImportantGI: 0 70 | m_StitchLightmapSeams: 1 71 | m_SelectedEditorRenderState: 0 72 | m_MinimumChartSize: 4 73 | m_AutoUVMaxDistance: 0.5 74 | m_AutoUVMaxAngle: 89 75 | m_LightmapParameters: {fileID: 0} 76 | m_SortingLayerID: 0 77 | m_SortingLayer: 0 78 | m_SortingOrder: 0 79 | m_Sprite: {fileID: 21031389, guid: 4d360a5b808266b43ab2ea1b1c130aa8, type: 3} 80 | m_Color: {r: 0.6588134, g: 0.37093064, b: 0.7610062, a: 1} 81 | m_FlipX: 0 82 | m_FlipY: 0 83 | m_DrawMode: 0 84 | m_Size: {x: 1, y: 1} 85 | m_AdaptiveModeThreshold: 0.5 86 | m_SpriteTileMode: 0 87 | m_WasSpriteAssigned: 1 88 | m_MaskInteraction: 0 89 | m_SpriteSortPoint: 0 90 | -------------------------------------------------------------------------------- /Assets/Prefabs/Potion.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &5477247486568225416 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 6489554241877102518} 12 | - component: {fileID: 9033634325943052087} 13 | m_Layer: 0 14 | m_Name: Potion 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &6489554241877102518 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 5477247486568225416} 27 | serializedVersion: 2 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: 1.7707226, y: 3.482885, z: 0} 30 | m_LocalScale: {x: 1, y: 1, z: 1} 31 | m_ConstrainProportionsScale: 0 32 | m_Children: [] 33 | m_Father: {fileID: 0} 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!212 &9033634325943052087 36 | SpriteRenderer: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 5477247486568225416} 42 | m_Enabled: 1 43 | m_CastShadows: 0 44 | m_ReceiveShadows: 0 45 | m_DynamicOccludee: 1 46 | m_StaticShadowCaster: 0 47 | m_MotionVectors: 1 48 | m_LightProbeUsage: 1 49 | m_ReflectionProbeUsage: 1 50 | m_RayTracingMode: 0 51 | m_RayTraceProcedural: 0 52 | m_RayTracingAccelStructBuildFlagsOverride: 0 53 | m_RayTracingAccelStructBuildFlags: 1 54 | m_SmallMeshCulling: 1 55 | m_RenderingLayerMask: 1 56 | m_RendererPriority: 0 57 | m_Materials: 58 | - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} 59 | m_StaticBatchInfo: 60 | firstSubMesh: 0 61 | subMeshCount: 0 62 | m_StaticBatchRoot: {fileID: 0} 63 | m_ProbeAnchor: {fileID: 0} 64 | m_LightProbeVolumeOverride: {fileID: 0} 65 | m_ScaleInLightmap: 1 66 | m_ReceiveGI: 1 67 | m_PreserveUVs: 0 68 | m_IgnoreNormalsForChartDetection: 0 69 | m_ImportantGI: 0 70 | m_StitchLightmapSeams: 1 71 | m_SelectedEditorRenderState: 0 72 | m_MinimumChartSize: 4 73 | m_AutoUVMaxDistance: 0.5 74 | m_AutoUVMaxAngle: 89 75 | m_LightmapParameters: {fileID: 0} 76 | m_SortingLayerID: 0 77 | m_SortingLayer: 0 78 | m_SortingOrder: 0 79 | m_Sprite: {fileID: -1584152612, guid: 4d360a5b808266b43ab2ea1b1c130aa8, type: 3} 80 | m_Color: {r: 1, g: 1, b: 1, a: 1} 81 | m_FlipX: 0 82 | m_FlipY: 0 83 | m_DrawMode: 0 84 | m_Size: {x: 1, y: 1} 85 | m_AdaptiveModeThreshold: 0.5 86 | m_SpriteTileMode: 0 87 | m_WasSpriteAssigned: 1 88 | m_MaskInteraction: 0 89 | m_SpriteSortPoint: 0 90 | -------------------------------------------------------------------------------- /Assets/Prefabs/Target-Cursor.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &8987445873653501865 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 4942723625608253020} 12 | - component: {fileID: 1537779405685233852} 13 | m_Layer: 0 14 | m_Name: Target-Cursor 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &4942723625608253020 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 8987445873653501865} 27 | serializedVersion: 2 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: -37, y: 15, z: 0} 30 | m_LocalScale: {x: 1, y: 1, z: 1} 31 | m_ConstrainProportionsScale: 0 32 | m_Children: [] 33 | m_Father: {fileID: 0} 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!212 &1537779405685233852 36 | SpriteRenderer: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 8987445873653501865} 42 | m_Enabled: 1 43 | m_CastShadows: 0 44 | m_ReceiveShadows: 0 45 | m_DynamicOccludee: 1 46 | m_StaticShadowCaster: 0 47 | m_MotionVectors: 1 48 | m_LightProbeUsage: 1 49 | m_ReflectionProbeUsage: 1 50 | m_RayTracingMode: 0 51 | m_RayTraceProcedural: 0 52 | m_RayTracingAccelStructBuildFlagsOverride: 0 53 | m_RayTracingAccelStructBuildFlags: 1 54 | m_SmallMeshCulling: 1 55 | m_RenderingLayerMask: 1 56 | m_RendererPriority: 0 57 | m_Materials: 58 | - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} 59 | m_StaticBatchInfo: 60 | firstSubMesh: 0 61 | subMeshCount: 0 62 | m_StaticBatchRoot: {fileID: 0} 63 | m_ProbeAnchor: {fileID: 0} 64 | m_LightProbeVolumeOverride: {fileID: 0} 65 | m_ScaleInLightmap: 1 66 | m_ReceiveGI: 1 67 | m_PreserveUVs: 0 68 | m_IgnoreNormalsForChartDetection: 0 69 | m_ImportantGI: 0 70 | m_StitchLightmapSeams: 1 71 | m_SelectedEditorRenderState: 0 72 | m_MinimumChartSize: 4 73 | m_AutoUVMaxDistance: 0.5 74 | m_AutoUVMaxAngle: 89 75 | m_LightmapParameters: {fileID: 0} 76 | m_SortingLayerID: 0 77 | m_SortingLayer: 0 78 | m_SortingOrder: 0 79 | m_Sprite: {fileID: 2140752837, guid: 4d360a5b808266b43ab2ea1b1c130aa8, type: 3} 80 | m_Color: {r: 1, g: 1, b: 1, a: 1} 81 | m_FlipX: 0 82 | m_FlipY: 0 83 | m_DrawMode: 0 84 | m_Size: {x: 1, y: 1} 85 | m_AdaptiveModeThreshold: 0.5 86 | m_SpriteTileMode: 0 87 | m_WasSpriteAssigned: 1 88 | m_MaskInteraction: 0 89 | m_SpriteSortPoint: 0 90 | -------------------------------------------------------------------------------- /Assets/Settings/Renderer2D.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 11145981673336645838492a2d98e247, type: 3} 13 | m_Name: Renderer2D 14 | m_EditorClassIdentifier: 15 | debugShaders: 16 | debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7, type: 3} 17 | hdrDebugViewPS: {fileID: 4800000, guid: 573620ae32aec764abd4d728906d2587, type: 3} 18 | probeVolumeSamplingDebugComputeShader: {fileID: 7200000, guid: 53626a513ea68ce47b59dc1299fe3959, type: 3} 19 | probeVolumeResources: 20 | probeVolumeDebugShader: {fileID: 4800000, guid: e5c6678ed2aaa91408dd3df699057aae, type: 3} 21 | probeVolumeFragmentationDebugShader: {fileID: 4800000, guid: 03cfc4915c15d504a9ed85ecc404e607, type: 3} 22 | probeVolumeOffsetDebugShader: {fileID: 4800000, guid: 53a11f4ebaebf4049b3638ef78dc9664, type: 3} 23 | probeVolumeSamplingDebugShader: {fileID: 4800000, guid: 8f96cd657dc40064aa21efcc7e50a2e7, type: 3} 24 | probeSamplingDebugMesh: {fileID: -3555484719484374845, guid: 57d7c4c16e2765b47a4d2069b311bffe, type: 3} 25 | probeSamplingDebugTexture: {fileID: 2800000, guid: 24ec0e140fb444a44ab96ee80844e18e, type: 3} 26 | m_RendererFeatures: [] 27 | m_RendererFeatureMap: 28 | m_UseNativeRenderPass: 0 29 | m_TransparencySortMode: 0 30 | m_TransparencySortAxis: {x: 0, y: 1, z: 0} 31 | m_HDREmulationScale: 1 32 | m_LightRenderTextureScale: 0.5 33 | m_LightBlendStyles: 34 | - name: Multiply 35 | maskTextureChannel: 0 36 | blendMode: 1 37 | - name: Additive 38 | maskTextureChannel: 0 39 | blendMode: 0 40 | - name: Multiply with Mask 41 | maskTextureChannel: 1 42 | blendMode: 1 43 | - name: Additive with Mask 44 | maskTextureChannel: 1 45 | blendMode: 0 46 | m_UseDepthStencilBuffer: 1 47 | m_UseCameraSortingLayersTexture: 0 48 | m_CameraSortingLayersTextureBound: -1 49 | m_CameraSortingLayerDownsamplingMethod: 0 50 | m_MaxLightRenderTextureCount: 16 51 | m_MaxShadowRenderTextureCount: 1 52 | m_LightShader: {fileID: 4800000, guid: 3f6c848ca3d7bca4bbe846546ac701a1, type: 3} 53 | m_CoreBlitShader: {fileID: 4800000, guid: 93446b5c5339d4f00b85c159e1159b7c, type: 3} 54 | m_CoreBlitColorAndDepthPS: {fileID: 4800000, guid: d104b2fc1ca6445babb8e90b0758136b, type: 3} 55 | m_BlitHDROverlay: {fileID: 4800000, guid: a89bee29cffa951418fc1e2da94d1959, type: 3} 56 | m_SamplingShader: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3} 57 | m_ProjectedShadowShader: {fileID: 4800000, guid: ce09d4a80b88c5a4eb9768fab4f1ee00, type: 3} 58 | m_SpriteShadowShader: {fileID: 4800000, guid: 44fc62292b65ab04eabcf310e799ccf6, type: 3} 59 | m_SpriteUnshadowShader: {fileID: 4800000, guid: de02b375720b5c445afe83cd483bedf3, type: 3} 60 | m_GeometryShadowShader: {fileID: 4800000, guid: 19349a0f9a7ed4c48a27445bcf92e5e1, type: 3} 61 | m_GeometryUnshadowShader: {fileID: 4800000, guid: 77774d9009bb81447b048c907d4c6273, type: 3} 62 | m_FallbackErrorShader: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3} 63 | m_PostProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2} 64 | m_FallOffLookup: {fileID: 2800000, guid: 5688ab254e4c0634f8d6c8e0792331ca, type: 3} 65 | m_DefaultMaterialType: 0 66 | m_DefaultCustomMaterial: {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} 67 | m_DefaultLitMaterial: {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} 68 | m_DefaultUnlitMaterial: {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2} 69 | m_DefaultMaskMaterial: {fileID: 2100000, guid: 15d0c3709176029428a0da2f8cecf0b5, type: 2} 70 | -------------------------------------------------------------------------------- /Assets/Settings/UniversalRP.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3} 13 | m_Name: UniversalRP 14 | m_EditorClassIdentifier: 15 | k_AssetVersion: 12 16 | k_AssetPreviousVersion: 12 17 | m_RendererType: 1 18 | m_RendererData: {fileID: 0} 19 | m_RendererDataList: 20 | - {fileID: 11400000, guid: 424799608f7334c24bf367e4bbfa7f9a, type: 2} 21 | m_DefaultRendererIndex: 0 22 | m_RequireDepthTexture: 0 23 | m_RequireOpaqueTexture: 0 24 | m_OpaqueDownsampling: 1 25 | m_SupportsTerrainHoles: 1 26 | m_SupportsHDR: 1 27 | m_HDRColorBufferPrecision: 0 28 | m_MSAA: 1 29 | m_RenderScale: 1 30 | m_UpscalingFilter: 0 31 | m_FsrOverrideSharpness: 0 32 | m_FsrSharpness: 0.92 33 | m_EnableLODCrossFade: 1 34 | m_LODCrossFadeDitheringType: 1 35 | m_ShEvalMode: 0 36 | m_LightProbeSystem: 0 37 | m_ProbeVolumeMemoryBudget: 1024 38 | m_ProbeVolumeBlendingMemoryBudget: 256 39 | m_SupportProbeVolumeGPUStreaming: 0 40 | m_SupportProbeVolumeDiskStreaming: 0 41 | m_SupportProbeVolumeScenarios: 0 42 | m_SupportProbeVolumeScenarioBlending: 0 43 | m_ProbeVolumeSHBands: 1 44 | m_MainLightRenderingMode: 1 45 | m_MainLightShadowsSupported: 1 46 | m_MainLightShadowmapResolution: 2048 47 | m_AdditionalLightsRenderingMode: 1 48 | m_AdditionalLightsPerObjectLimit: 4 49 | m_AdditionalLightShadowsSupported: 0 50 | m_AdditionalLightsShadowmapResolution: 2048 51 | m_AdditionalLightsShadowResolutionTierLow: 512 52 | m_AdditionalLightsShadowResolutionTierMedium: 1024 53 | m_AdditionalLightsShadowResolutionTierHigh: 2048 54 | m_ReflectionProbeBlending: 0 55 | m_ReflectionProbeBoxProjection: 0 56 | m_ShadowDistance: 50 57 | m_ShadowCascadeCount: 1 58 | m_Cascade2Split: 0.25 59 | m_Cascade3Split: {x: 0.1, y: 0.3} 60 | m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467} 61 | m_CascadeBorder: 0.1 62 | m_ShadowDepthBias: 1 63 | m_ShadowNormalBias: 1 64 | m_AnyShadowsSupported: 1 65 | m_SoftShadowsSupported: 0 66 | m_ConservativeEnclosingSphere: 0 67 | m_NumIterationsEnclosingSphere: 64 68 | m_SoftShadowQuality: 2 69 | m_AdditionalLightsCookieResolution: 2048 70 | m_AdditionalLightsCookieFormat: 3 71 | m_UseSRPBatcher: 1 72 | m_SupportsDynamicBatching: 0 73 | m_MixedLightingSupported: 1 74 | m_SupportsLightCookies: 1 75 | m_SupportsLightLayers: 0 76 | m_DebugLevel: 0 77 | m_StoreActionsOptimization: 0 78 | m_UseAdaptivePerformance: 1 79 | m_ColorGradingMode: 0 80 | m_ColorGradingLutSize: 32 81 | m_UseFastSRGBLinearConversion: 0 82 | m_SupportDataDrivenLensFlare: 1 83 | m_SupportScreenSpaceLensFlare: 1 84 | m_GPUResidentDrawerMode: 0 85 | m_SmallMeshScreenPercentage: 0 86 | m_GPUResidentDrawerEnableOcclusionCullingInCameras: 0 87 | m_ShadowType: 1 88 | m_LocalShadowsSupported: 0 89 | m_LocalShadowsAtlasResolution: 256 90 | m_MaxPixelLights: 0 91 | m_ShadowAtlasResolution: 256 92 | m_VolumeFrameworkUpdateMode: 0 93 | m_VolumeProfile: {fileID: 0} 94 | apvScenesData: 95 | obsoleteSceneBounds: 96 | m_Keys: [] 97 | m_Values: [] 98 | obsoleteHasProbeVolumes: 99 | m_Keys: [] 100 | m_Values: 101 | m_PrefilteringModeMainLightShadows: 1 102 | m_PrefilteringModeAdditionalLight: 4 103 | m_PrefilteringModeAdditionalLightShadows: 1 104 | m_PrefilterXRKeywords: 0 105 | m_PrefilteringModeForwardPlus: 1 106 | m_PrefilteringModeDeferredRendering: 1 107 | m_PrefilteringModeScreenSpaceOcclusion: 1 108 | m_PrefilterDebugKeywords: 0 109 | m_PrefilterWriteRenderingLayers: 0 110 | m_PrefilterHDROutput: 0 111 | m_PrefilterSSAODepthNormals: 0 112 | m_PrefilterSSAOSourceDepthLow: 0 113 | m_PrefilterSSAOSourceDepthMedium: 0 114 | m_PrefilterSSAOSourceDepthHigh: 0 115 | m_PrefilterSSAOInterleaved: 0 116 | m_PrefilterSSAOBlueNoise: 0 117 | m_PrefilterSSAOSampleCountLow: 0 118 | m_PrefilterSSAOSampleCountMedium: 0 119 | m_PrefilterSSAOSampleCountHigh: 0 120 | m_PrefilterDBufferMRT1: 0 121 | m_PrefilterDBufferMRT2: 0 122 | m_PrefilterDBufferMRT3: 0 123 | m_PrefilterSoftShadowsQualityLow: 0 124 | m_PrefilterSoftShadowsQualityMedium: 0 125 | m_PrefilterSoftShadowsQualityHigh: 0 126 | m_PrefilterSoftShadows: 0 127 | m_PrefilterScreenCoord: 0 128 | m_PrefilterNativeRenderPass: 0 129 | m_PrefilterUseLegacyLightmaps: 0 130 | m_ShaderVariantLogLevel: 0 131 | m_ShadowCascades: 0 132 | m_Textures: 133 | blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3} 134 | bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3} 135 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Fonts/LiberationSans - OFL.txt: -------------------------------------------------------------------------------- 1 | Digitized data copyright (c) 2010 Google Corporation 2 | with Reserved Font Arimo, Tinos and Cousine. 3 | Copyright (c) 2012 Red Hat, Inc. 4 | with Reserved Font Name Liberation. 5 | 6 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 7 | This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL 8 | 9 | ----------------------------------------------------------- 10 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 11 | ----------------------------------------------------------- 12 | 13 | PREAMBLE 14 | The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. 15 | 16 | The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. 17 | 18 | DEFINITIONS 19 | "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. 20 | 21 | "Reserved Font Name" refers to any names specified as such after the copyright statement(s). 22 | 23 | "Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). 24 | 25 | "Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. 26 | 27 | "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. 28 | 29 | PERMISSION & CONDITIONS 30 | Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 31 | 32 | 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 33 | 34 | 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 35 | 36 | 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 37 | 38 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 39 | 40 | 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. 41 | 42 | TERMINATION 43 | This license becomes null and void if any of the above conditions are not met. 44 | 45 | DISCLAIMER 46 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Fonts/LiberationSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotus-git/Unity-Monads/36a6b143396f3301d6f8e0b1979494980cb384c6/Assets/TextMesh Pro/Fonts/LiberationSans.ttf -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Drop Shadow.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: LiberationSans SDF - Drop Shadow 11 | m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3} 12 | m_ShaderKeywords: OUTLINE_ON UNDERLAY_ON 13 | m_LightmapFlags: 5 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _Cube: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _FaceTex: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _MainTex: 35 | m_Texture: {fileID: 28684132378477856, guid: 8f586378b4e144a9851e7b34d9b748ee, 36 | type: 2} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _OutlineTex: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | m_Floats: 44 | - _Ambient: 0.5 45 | - _Bevel: 0.5 46 | - _BevelClamp: 0 47 | - _BevelOffset: 0 48 | - _BevelRoundness: 0 49 | - _BevelWidth: 0 50 | - _BumpFace: 0 51 | - _BumpOutline: 0 52 | - _ColorMask: 15 53 | - _Diffuse: 0.5 54 | - _DiffusePower: 1 55 | - _FaceDilate: 0.1 56 | - _FaceUVSpeedX: 0 57 | - _FaceUVSpeedY: 0 58 | - _GlowInner: 0.05 59 | - _GlowOffset: 0 60 | - _GlowOuter: 0.05 61 | - _GlowPower: 0.75 62 | - _GradientScale: 10 63 | - _LightAngle: 3.1416 64 | - _MaskSoftnessX: 0 65 | - _MaskSoftnessY: 0 66 | - _OutlineSoftness: 0 67 | - _OutlineUVSpeedX: 0 68 | - _OutlineUVSpeedY: 0 69 | - _OutlineWidth: 0.1 70 | - _PerspectiveFilter: 0.875 71 | - _Reflectivity: 10 72 | - _ScaleRatioA: 0.9 73 | - _ScaleRatioB: 0.73125 74 | - _ScaleRatioC: 0.64125 75 | - _ScaleX: 1 76 | - _ScaleY: 1 77 | - _ShaderFlags: 0 78 | - _Sharpness: 0 79 | - _SpecularPower: 2 80 | - _Stencil: 0 81 | - _StencilComp: 8 82 | - _StencilOp: 0 83 | - _StencilReadMask: 255 84 | - _StencilWriteMask: 255 85 | - _TextureHeight: 1024 86 | - _TextureWidth: 1024 87 | - _UnderlayDilate: 0 88 | - _UnderlayOffsetX: 0.5 89 | - _UnderlayOffsetY: -0.5 90 | - _UnderlaySoftness: 0.05 91 | - _VertexOffsetX: 0 92 | - _VertexOffsetY: 0 93 | - _WeightBold: 0.75 94 | - _WeightNormal: 0 95 | m_Colors: 96 | - _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767} 97 | - _Color: {r: 1, g: 1, b: 1, a: 1} 98 | - _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0} 99 | - _FaceColor: {r: 1, g: 1, b: 1, a: 1} 100 | - _GlowColor: {r: 0, g: 1, b: 0, a: 0.5} 101 | - _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767} 102 | - _OutlineColor: {r: 0, g: 0, b: 0, a: 1} 103 | - _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1} 104 | - _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1} 105 | - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} 106 | - _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5} 107 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Outline.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: LiberationSans SDF - Outline 11 | m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3} 12 | m_ShaderKeywords: OUTLINE_ON 13 | m_LightmapFlags: 5 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _Cube: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _FaceTex: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _MainTex: 35 | m_Texture: {fileID: 28684132378477856, guid: 8f586378b4e144a9851e7b34d9b748ee, 36 | type: 2} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _OutlineTex: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | m_Floats: 44 | - _Ambient: 0.5 45 | - _Bevel: 0.5 46 | - _BevelClamp: 0 47 | - _BevelOffset: 0 48 | - _BevelRoundness: 0 49 | - _BevelWidth: 0 50 | - _BumpFace: 0 51 | - _BumpOutline: 0 52 | - _ColorMask: 15 53 | - _Diffuse: 0.5 54 | - _FaceDilate: 0.1 55 | - _FaceUVSpeedX: 0 56 | - _FaceUVSpeedY: 0 57 | - _GlowInner: 0.05 58 | - _GlowOffset: 0 59 | - _GlowOuter: 0.05 60 | - _GlowPower: 0.75 61 | - _GradientScale: 10 62 | - _LightAngle: 3.1416 63 | - _MaskSoftnessX: 0 64 | - _MaskSoftnessY: 0 65 | - _OutlineSoftness: 0 66 | - _OutlineUVSpeedX: 0 67 | - _OutlineUVSpeedY: 0 68 | - _OutlineWidth: 0.1 69 | - _PerspectiveFilter: 0.875 70 | - _Reflectivity: 10 71 | - _ScaleRatioA: 0.9 72 | - _ScaleRatioB: 0.73125 73 | - _ScaleRatioC: 0.64125 74 | - _ScaleX: 1 75 | - _ScaleY: 1 76 | - _ShaderFlags: 0 77 | - _Sharpness: 0 78 | - _SpecularPower: 2 79 | - _Stencil: 0 80 | - _StencilComp: 8 81 | - _StencilOp: 0 82 | - _StencilReadMask: 255 83 | - _StencilWriteMask: 255 84 | - _TextureHeight: 1024 85 | - _TextureWidth: 1024 86 | - _UnderlayDilate: 0 87 | - _UnderlayOffsetX: 0 88 | - _UnderlayOffsetY: 0 89 | - _UnderlaySoftness: 0 90 | - _VertexOffsetX: 0 91 | - _VertexOffsetY: 0 92 | - _WeightBold: 0.75 93 | - _WeightNormal: 0 94 | m_Colors: 95 | - _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767} 96 | - _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0} 97 | - _FaceColor: {r: 1, g: 1, b: 1, a: 1} 98 | - _GlowColor: {r: 0, g: 1, b: 0, a: 0.5} 99 | - _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767} 100 | - _OutlineColor: {r: 0, g: 0, b: 0, a: 1} 101 | - _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1} 102 | - _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1} 103 | - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} 104 | - _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5} 105 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/LineBreaking Following Characters.txt: -------------------------------------------------------------------------------- 1 | )]}〕〉》」』】〙〗〟’”⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、%,.:;。!?]):;=}¢°"†‡℃〆%,. -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/LineBreaking Leading Characters.txt: -------------------------------------------------------------------------------- 1 | ([{〔〈《「『【〘〖〝‘“⦅«$—…‥〳〴〵\[({£¥"々〇$¥₩ # -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/Style Sheets/Default Style Sheet.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: ab2114bdc8544297b417dfefe9f1e410, type: 3} 13 | m_Name: Default Style Sheet 14 | m_EditorClassIdentifier: 15 | m_StyleList: 16 | - m_Name: Normal 17 | m_HashCode: -1183493901 18 | m_OpeningDefinition: 19 | m_ClosingDefinition: 20 | m_OpeningTagArray: 21 | m_ClosingTagArray: 22 | - m_Name: H1 23 | m_HashCode: 2425 24 | m_OpeningDefinition: <#40ff80>* 25 | m_ClosingDefinition: '*' 26 | m_OpeningTagArray: 3c00000073000000690000007a000000650000003d00000032000000650000006d0000003e0000003c000000620000003e0000003c000000230000003400000030000000660000006600000038000000300000003e0000002a000000 27 | m_ClosingTagArray: 2a0000003c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e000000 28 | - m_Name: Quote 29 | m_HashCode: 93368250 30 | m_OpeningDefinition: 31 | m_ClosingDefinition: 32 | m_OpeningTagArray: 3c000000690000003e0000003c00000073000000690000007a000000650000003d0000003700000035000000250000003e0000003c0000006d000000610000007200000067000000690000006e0000003d0000003100000030000000250000003e000000 33 | m_ClosingTagArray: 3c0000002f000000690000003e0000003c0000002f00000073000000690000007a000000650000003e0000003c0000002f00000077000000690000006400000074000000680000003e0000003c0000002f0000006d000000610000007200000067000000690000006e0000003e000000 34 | - m_Name: A 35 | m_HashCode: 65 36 | m_OpeningDefinition: 37 | m_ClosingDefinition: 38 | m_OpeningTagArray: 3c000000630000006f0000006c0000006f000000720000003d000000230000003400000030000000610000003000000066000000660000003e0000003c000000750000003e000000 39 | m_ClosingTagArray: 3c0000002f000000750000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e000000 40 | - m_Name: Link 41 | m_HashCode: 2656128 42 | m_OpeningDefinition: <#40a0ff> 43 | m_ClosingDefinition: 44 | m_OpeningTagArray: 3c000000750000003e0000003c000000230000003400000030000000610000003000000066000000660000003e0000003c0000006c000000690000006e0000006b0000003d0000002200000049000000440000005f0000003000000031000000220000003e000000 45 | m_ClosingTagArray: 3c0000002f000000750000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e0000003c0000002f0000006c000000690000006e0000006b0000003e000000 46 | - m_Name: Title 47 | m_HashCode: 97690656 48 | m_OpeningDefinition: 49 | m_ClosingDefinition: 50 | m_OpeningTagArray: 3c00000073000000690000007a000000650000003d000000310000003200000035000000250000003e0000003c000000620000003e0000003c000000610000006c00000069000000670000006e0000003d00000063000000650000006e0000007400000065000000720000003e000000 51 | m_ClosingTagArray: 3c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000610000006c00000069000000670000006e0000003e000000 52 | - m_Name: H2 53 | m_HashCode: 2426 54 | m_OpeningDefinition: <#4080FF> 55 | m_ClosingDefinition: 56 | m_OpeningTagArray: 3c00000073000000690000007a000000650000003d000000310000002e00000035000000650000006d0000003e0000003c000000620000003e0000003c000000230000003400000030000000380000003000000046000000460000003e000000 57 | m_ClosingTagArray: 3c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e000000 58 | - m_Name: H3 59 | m_HashCode: 2427 60 | m_OpeningDefinition: <#FF8040> 61 | m_ClosingDefinition: 62 | m_OpeningTagArray: 3c00000073000000690000007a000000650000003d000000310000002e0000003100000037000000650000006d0000003e0000003c000000620000003e0000003c000000230000004600000046000000380000003000000034000000300000003e000000 63 | m_ClosingTagArray: 3c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e000000 64 | - m_Name: C1 65 | m_HashCode: 2194 66 | m_OpeningDefinition: 67 | m_ClosingDefinition: 68 | m_OpeningTagArray: 3c000000630000006f0000006c0000006f000000720000003d000000230000006600000066000000660000006600000034000000300000003e000000 69 | m_ClosingTagArray: 3c0000002f000000630000006f0000006c0000006f000000720000003e000000 70 | - m_Name: C2 71 | m_HashCode: 2193 72 | m_OpeningDefinition: 73 | m_ClosingDefinition: 74 | m_OpeningTagArray: 3c000000630000006f0000006c0000006f000000720000003d000000230000006600000066000000340000003000000046000000460000003e0000003c00000073000000690000007a000000650000003d000000310000003200000035000000250000003e000000 75 | m_ClosingTagArray: 3c0000002f000000630000006f0000006c0000006f000000720000003e0000003c0000002f00000073000000690000007a000000650000003e000000 76 | - m_Name: C3 77 | m_HashCode: 2192 78 | m_OpeningDefinition: 79 | m_ClosingDefinition: 80 | m_OpeningTagArray: 3c000000630000006f0000006c0000006f000000720000003d000000230000003800000030000000410000003000000046000000460000003e0000003c000000620000003e000000 81 | m_ClosingTagArray: 3c0000002f000000630000006f0000006c0000006f000000720000003e0000003c0000002f000000620000003e000000 82 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Resources/TMP Settings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 2705215ac5b84b70bacc50632be6e391, type: 3} 13 | m_Name: TMP Settings 14 | m_EditorClassIdentifier: 15 | assetVersion: 2 16 | m_TextWrappingMode: 1 17 | m_enableKerning: 1 18 | m_ActiveFontFeatures: 00000000 19 | m_enableExtraPadding: 0 20 | m_enableTintAllSprites: 0 21 | m_enableParseEscapeCharacters: 1 22 | m_EnableRaycastTarget: 1 23 | m_GetFontFeaturesAtRuntime: 1 24 | m_missingGlyphCharacter: 0 25 | m_ClearDynamicDataOnBuild: 1 26 | m_warningsDisabled: 0 27 | m_defaultFontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} 28 | m_defaultFontAssetPath: Fonts & Materials/ 29 | m_defaultFontSize: 36 30 | m_defaultAutoSizeMinRatio: 0.5 31 | m_defaultAutoSizeMaxRatio: 2 32 | m_defaultTextMeshProTextContainerSize: {x: 20, y: 5} 33 | m_defaultTextMeshProUITextContainerSize: {x: 200, y: 50} 34 | m_autoSizeTextContainer: 0 35 | m_IsTextObjectScaleStatic: 0 36 | m_fallbackFontAssets: [] 37 | m_matchMaterialPreset: 1 38 | m_HideSubTextObjects: 0 39 | m_defaultSpriteAsset: {fileID: 11400000, guid: c41005c129ba4d66911b75229fd70b45, 40 | type: 2} 41 | m_defaultSpriteAssetPath: Sprite Assets/ 42 | m_enableEmojiSupport: 1 43 | m_MissingCharacterSpriteUnicode: 0 44 | m_EmojiFallbackTextAssets: [] 45 | m_defaultColorGradientPresetsPath: Color Gradient Presets/ 46 | m_defaultStyleSheet: {fileID: 11400000, guid: f952c082cb03451daed3ee968ac6c63e, 47 | type: 2} 48 | m_StyleSheetsResourcePath: 49 | m_leadingCharacters: {fileID: 4900000, guid: d82c1b31c7e74239bff1220585707d2b, type: 3} 50 | m_followingCharacters: {fileID: 4900000, guid: fade42e8bc714b018fac513c043d323b, 51 | type: 3} 52 | m_UseModernHangulLineBreakingRules: 0 53 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Shaders/TMP_Bitmap-Custom-Atlas.shader: -------------------------------------------------------------------------------- 1 | Shader "TextMeshPro/Bitmap Custom Atlas" { 2 | 3 | Properties { 4 | _MainTex ("Font Atlas", 2D) = "white" {} 5 | _FaceTex ("Font Texture", 2D) = "white" {} 6 | _FaceColor ("Text Color", Color) = (1,1,1,1) 7 | 8 | _VertexOffsetX ("Vertex OffsetX", float) = 0 9 | _VertexOffsetY ("Vertex OffsetY", float) = 0 10 | _MaskSoftnessX ("Mask SoftnessX", float) = 0 11 | _MaskSoftnessY ("Mask SoftnessY", float) = 0 12 | 13 | _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) 14 | _Padding ("Padding", float) = 0 15 | 16 | _StencilComp ("Stencil Comparison", Float) = 8 17 | _Stencil ("Stencil ID", Float) = 0 18 | _StencilOp ("Stencil Operation", Float) = 0 19 | _StencilWriteMask ("Stencil Write Mask", Float) = 255 20 | _StencilReadMask ("Stencil Read Mask", Float) = 255 21 | 22 | _CullMode ("Cull Mode", Float) = 0 23 | _ColorMask ("Color Mask", Float) = 15 24 | } 25 | 26 | SubShader{ 27 | 28 | Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" } 29 | 30 | Stencil 31 | { 32 | Ref[_Stencil] 33 | Comp[_StencilComp] 34 | Pass[_StencilOp] 35 | ReadMask[_StencilReadMask] 36 | WriteMask[_StencilWriteMask] 37 | } 38 | 39 | 40 | Lighting Off 41 | Cull [_CullMode] 42 | ZTest [unity_GUIZTestMode] 43 | ZWrite Off 44 | Fog { Mode Off } 45 | Blend SrcAlpha OneMinusSrcAlpha 46 | ColorMask[_ColorMask] 47 | 48 | Pass { 49 | CGPROGRAM 50 | #pragma vertex vert 51 | #pragma fragment frag 52 | 53 | #pragma multi_compile __ UNITY_UI_CLIP_RECT 54 | #pragma multi_compile __ UNITY_UI_ALPHACLIP 55 | 56 | 57 | #include "UnityCG.cginc" 58 | #include "UnityUI.cginc" 59 | 60 | struct appdata_t 61 | { 62 | float4 vertex : POSITION; 63 | fixed4 color : COLOR; 64 | float4 texcoord0 : TEXCOORD0; 65 | float2 texcoord1 : TEXCOORD1; 66 | }; 67 | 68 | struct v2f 69 | { 70 | float4 vertex : SV_POSITION; 71 | fixed4 color : COLOR; 72 | float2 texcoord0 : TEXCOORD0; 73 | float2 texcoord1 : TEXCOORD1; 74 | float4 mask : TEXCOORD2; 75 | }; 76 | 77 | uniform sampler2D _MainTex; 78 | uniform sampler2D _FaceTex; 79 | uniform float4 _FaceTex_ST; 80 | uniform fixed4 _FaceColor; 81 | 82 | uniform float _VertexOffsetX; 83 | uniform float _VertexOffsetY; 84 | uniform float4 _ClipRect; 85 | uniform float _MaskSoftnessX; 86 | uniform float _MaskSoftnessY; 87 | uniform float _UIMaskSoftnessX; 88 | uniform float _UIMaskSoftnessY; 89 | uniform int _UIVertexColorAlwaysGammaSpace; 90 | 91 | v2f vert (appdata_t v) 92 | { 93 | float4 vert = v.vertex; 94 | vert.x += _VertexOffsetX; 95 | vert.y += _VertexOffsetY; 96 | 97 | vert.xy += (vert.w * 0.5) / _ScreenParams.xy; 98 | 99 | float4 vPosition = UnityPixelSnap(UnityObjectToClipPos(vert)); 100 | 101 | if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace()) 102 | { 103 | v.color.rgb = UIGammaToLinear(v.color.rgb); 104 | } 105 | fixed4 faceColor = v.color; 106 | faceColor *= _FaceColor; 107 | 108 | v2f OUT; 109 | OUT.vertex = vPosition; 110 | OUT.color = faceColor; 111 | OUT.texcoord0 = v.texcoord0; 112 | OUT.texcoord1 = TRANSFORM_TEX(v.texcoord1, _FaceTex); 113 | float2 pixelSize = vPosition.w; 114 | pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1])); 115 | 116 | // Clamp _ClipRect to 16bit. 117 | const float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); 118 | const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY)); 119 | OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy)); 120 | 121 | return OUT; 122 | } 123 | 124 | fixed4 frag (v2f IN) : SV_Target 125 | { 126 | fixed4 color = tex2D(_MainTex, IN.texcoord0) * tex2D(_FaceTex, IN.texcoord1) * IN.color; 127 | 128 | // Alternative implementation to UnityGet2DClipping with support for softness. 129 | #if UNITY_UI_CLIP_RECT 130 | half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw); 131 | color *= m.x * m.y; 132 | #endif 133 | 134 | #if UNITY_UI_ALPHACLIP 135 | clip(color.a - 0.001); 136 | #endif 137 | 138 | return color; 139 | } 140 | ENDCG 141 | } 142 | } 143 | 144 | CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI" 145 | } 146 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Shaders/TMP_Bitmap-Mobile.shader: -------------------------------------------------------------------------------- 1 | Shader "TextMeshPro/Mobile/Bitmap" { 2 | 3 | Properties { 4 | _MainTex ("Font Atlas", 2D) = "white" {} 5 | _Color ("Text Color", Color) = (1,1,1,1) 6 | _DiffusePower ("Diffuse Power", Range(1.0,4.0)) = 1.0 7 | 8 | _VertexOffsetX ("Vertex OffsetX", float) = 0 9 | _VertexOffsetY ("Vertex OffsetY", float) = 0 10 | _MaskSoftnessX ("Mask SoftnessX", float) = 0 11 | _MaskSoftnessY ("Mask SoftnessY", float) = 0 12 | 13 | _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) 14 | 15 | _StencilComp ("Stencil Comparison", Float) = 8 16 | _Stencil ("Stencil ID", Float) = 0 17 | _StencilOp ("Stencil Operation", Float) = 0 18 | _StencilWriteMask ("Stencil Write Mask", Float) = 255 19 | _StencilReadMask ("Stencil Read Mask", Float) = 255 20 | 21 | _CullMode ("Cull Mode", Float) = 0 22 | _ColorMask ("Color Mask", Float) = 15 23 | } 24 | 25 | SubShader { 26 | 27 | Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } 28 | 29 | Stencil 30 | { 31 | Ref[_Stencil] 32 | Comp[_StencilComp] 33 | Pass[_StencilOp] 34 | ReadMask[_StencilReadMask] 35 | WriteMask[_StencilWriteMask] 36 | } 37 | 38 | 39 | Lighting Off 40 | Cull [_CullMode] 41 | ZTest [unity_GUIZTestMode] 42 | ZWrite Off 43 | Fog { Mode Off } 44 | Blend SrcAlpha OneMinusSrcAlpha 45 | ColorMask[_ColorMask] 46 | 47 | Pass { 48 | CGPROGRAM 49 | #pragma vertex vert 50 | #pragma fragment frag 51 | #pragma fragmentoption ARB_precision_hint_fastest 52 | 53 | #pragma multi_compile __ UNITY_UI_CLIP_RECT 54 | #pragma multi_compile __ UNITY_UI_ALPHACLIP 55 | 56 | 57 | #include "UnityCG.cginc" 58 | #include "UnityUI.cginc" 59 | 60 | struct appdata_t 61 | { 62 | float4 vertex : POSITION; 63 | fixed4 color : COLOR; 64 | float2 texcoord0 : TEXCOORD0; 65 | float2 texcoord1 : TEXCOORD1; 66 | }; 67 | 68 | struct v2f 69 | { 70 | float4 vertex : POSITION; 71 | fixed4 color : COLOR; 72 | float2 texcoord0 : TEXCOORD0; 73 | float4 mask : TEXCOORD2; 74 | }; 75 | 76 | sampler2D _MainTex; 77 | fixed4 _Color; 78 | float _DiffusePower; 79 | 80 | uniform float _VertexOffsetX; 81 | uniform float _VertexOffsetY; 82 | uniform float4 _ClipRect; 83 | uniform float _MaskSoftnessX; 84 | uniform float _MaskSoftnessY; 85 | uniform float _UIMaskSoftnessX; 86 | uniform float _UIMaskSoftnessY; 87 | uniform int _UIVertexColorAlwaysGammaSpace; 88 | 89 | v2f vert (appdata_t v) 90 | { 91 | v2f OUT; 92 | float4 vert = v.vertex; 93 | vert.x += _VertexOffsetX; 94 | vert.y += _VertexOffsetY; 95 | 96 | vert.xy += (vert.w * 0.5) / _ScreenParams.xy; 97 | if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace()) 98 | { 99 | v.color.rgb = UIGammaToLinear(v.color.rgb); 100 | } 101 | OUT.vertex = UnityPixelSnap(UnityObjectToClipPos(vert)); 102 | OUT.color = v.color; 103 | OUT.color *= _Color; 104 | OUT.color.rgb *= _DiffusePower; 105 | OUT.texcoord0 = v.texcoord0; 106 | 107 | float2 pixelSize = OUT.vertex.w; 108 | //pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1])); 109 | 110 | // Clamp _ClipRect to 16bit. 111 | const float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); 112 | const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY)); 113 | OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy)); 114 | 115 | return OUT; 116 | } 117 | 118 | fixed4 frag (v2f IN) : COLOR 119 | { 120 | fixed4 color = fixed4(IN.color.rgb, IN.color.a * tex2D(_MainTex, IN.texcoord0).a); 121 | 122 | // Alternative implementation to UnityGet2DClipping with support for softness. 123 | #if UNITY_UI_CLIP_RECT 124 | half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw); 125 | color *= m.x * m.y; 126 | #endif 127 | 128 | #if UNITY_UI_ALPHACLIP 129 | clip(color.a - 0.001); 130 | #endif 131 | 132 | return color; 133 | } 134 | ENDCG 135 | } 136 | } 137 | 138 | SubShader { 139 | Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } 140 | Lighting Off Cull Off ZTest Always ZWrite Off Fog { Mode Off } 141 | Blend SrcAlpha OneMinusSrcAlpha 142 | BindChannels { 143 | Bind "Color", color 144 | Bind "Vertex", vertex 145 | Bind "TexCoord", texcoord0 146 | } 147 | Pass { 148 | SetTexture [_MainTex] { 149 | constantColor [_Color] combine constant * primary, constant * texture 150 | } 151 | } 152 | } 153 | 154 | CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI" 155 | } 156 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Shaders/TMP_Bitmap.shader: -------------------------------------------------------------------------------- 1 | Shader "TextMeshPro/Bitmap" { 2 | 3 | Properties { 4 | _MainTex ("Font Atlas", 2D) = "white" {} 5 | _FaceTex ("Font Texture", 2D) = "white" {} 6 | _FaceColor ("Text Color", Color) = (1,1,1,1) 7 | 8 | _VertexOffsetX ("Vertex OffsetX", float) = 0 9 | _VertexOffsetY ("Vertex OffsetY", float) = 0 10 | _MaskSoftnessX ("Mask SoftnessX", float) = 0 11 | _MaskSoftnessY ("Mask SoftnessY", float) = 0 12 | 13 | _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) 14 | 15 | _StencilComp ("Stencil Comparison", Float) = 8 16 | _Stencil ("Stencil ID", Float) = 0 17 | _StencilOp ("Stencil Operation", Float) = 0 18 | _StencilWriteMask ("Stencil Write Mask", Float) = 255 19 | _StencilReadMask ("Stencil Read Mask", Float) = 255 20 | 21 | _CullMode ("Cull Mode", Float) = 0 22 | _ColorMask ("Color Mask", Float) = 15 23 | } 24 | 25 | SubShader{ 26 | 27 | Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" } 28 | 29 | Stencil 30 | { 31 | Ref[_Stencil] 32 | Comp[_StencilComp] 33 | Pass[_StencilOp] 34 | ReadMask[_StencilReadMask] 35 | WriteMask[_StencilWriteMask] 36 | } 37 | 38 | 39 | Lighting Off 40 | Cull [_CullMode] 41 | ZTest [unity_GUIZTestMode] 42 | ZWrite Off 43 | Fog { Mode Off } 44 | Blend SrcAlpha OneMinusSrcAlpha 45 | ColorMask[_ColorMask] 46 | 47 | Pass { 48 | CGPROGRAM 49 | #pragma vertex vert 50 | #pragma fragment frag 51 | 52 | #pragma multi_compile __ UNITY_UI_CLIP_RECT 53 | #pragma multi_compile __ UNITY_UI_ALPHACLIP 54 | 55 | 56 | #include "UnityCG.cginc" 57 | #include "UnityUI.cginc" 58 | 59 | struct appdata_t 60 | { 61 | float4 vertex : POSITION; 62 | fixed4 color : COLOR; 63 | float4 texcoord0 : TEXCOORD0; 64 | float2 texcoord1 : TEXCOORD1; 65 | }; 66 | 67 | struct v2f 68 | { 69 | float4 vertex : SV_POSITION; 70 | fixed4 color : COLOR; 71 | float2 texcoord0 : TEXCOORD0; 72 | float2 texcoord1 : TEXCOORD1; 73 | float4 mask : TEXCOORD2; 74 | }; 75 | 76 | uniform sampler2D _MainTex; 77 | uniform sampler2D _FaceTex; 78 | uniform float4 _FaceTex_ST; 79 | uniform fixed4 _FaceColor; 80 | 81 | uniform float _VertexOffsetX; 82 | uniform float _VertexOffsetY; 83 | uniform float4 _ClipRect; 84 | uniform float _MaskSoftnessX; 85 | uniform float _MaskSoftnessY; 86 | uniform float _UIMaskSoftnessX; 87 | uniform float _UIMaskSoftnessY; 88 | uniform int _UIVertexColorAlwaysGammaSpace; 89 | 90 | v2f vert (appdata_t v) 91 | { 92 | float4 vert = v.vertex; 93 | vert.x += _VertexOffsetX; 94 | vert.y += _VertexOffsetY; 95 | 96 | vert.xy += (vert.w * 0.5) / _ScreenParams.xy; 97 | 98 | float4 vPosition = UnityPixelSnap(UnityObjectToClipPos(vert)); 99 | 100 | if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace()) 101 | { 102 | v.color.rgb = UIGammaToLinear(v.color.rgb); 103 | } 104 | fixed4 faceColor = v.color; 105 | faceColor *= _FaceColor; 106 | 107 | v2f OUT; 108 | OUT.vertex = vPosition; 109 | OUT.color = faceColor; 110 | OUT.texcoord0 = v.texcoord0; 111 | OUT.texcoord1 = TRANSFORM_TEX(v.texcoord1, _FaceTex); 112 | float2 pixelSize = vPosition.w; 113 | pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1])); 114 | 115 | // Clamp _ClipRect to 16bit. 116 | const float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); 117 | const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY)); 118 | OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy)); 119 | 120 | return OUT; 121 | } 122 | 123 | fixed4 frag (v2f IN) : SV_Target 124 | { 125 | fixed4 color = tex2D(_MainTex, IN.texcoord0); 126 | color = fixed4 (tex2D(_FaceTex, IN.texcoord1).rgb * IN.color.rgb, IN.color.a * color.a); 127 | 128 | // Alternative implementation to UnityGet2DClipping with support for softness. 129 | #if UNITY_UI_CLIP_RECT 130 | half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw); 131 | color *= m.x * m.y; 132 | #endif 133 | 134 | #if UNITY_UI_ALPHACLIP 135 | clip(color.a - 0.001); 136 | #endif 137 | 138 | return color; 139 | } 140 | ENDCG 141 | } 142 | } 143 | 144 | CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI" 145 | } 146 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile SSD.shader: -------------------------------------------------------------------------------- 1 | // Simplified SDF shader: 2 | // - No Shading Option (bevel / bump / env map) 3 | // - No Glow Option 4 | // - Softness is applied on both side of the outline 5 | 6 | Shader "TextMeshPro/Mobile/Distance Field SSD" { 7 | 8 | Properties { 9 | _FaceColor ("Face Color", Color) = (1,1,1,1) 10 | _FaceDilate ("Face Dilate", Range(-1,1)) = 0 11 | 12 | _OutlineColor ("Outline Color", Color) = (0,0,0,1) 13 | _OutlineWidth ("Outline Thickness", Range(0,1)) = 0 14 | _OutlineSoftness ("Outline Softness", Range(0,1)) = 0 15 | 16 | _UnderlayColor ("Border Color", Color) = (0,0,0,.5) 17 | _UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0 18 | _UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0 19 | _UnderlayDilate ("Border Dilate", Range(-1,1)) = 0 20 | _UnderlaySoftness ("Border Softness", Range(0,1)) = 0 21 | 22 | _WeightNormal ("Weight Normal", float) = 0 23 | _WeightBold ("Weight Bold", float) = .5 24 | 25 | _ShaderFlags ("Flags", float) = 0 26 | _ScaleRatioA ("Scale RatioA", float) = 1 27 | _ScaleRatioB ("Scale RatioB", float) = 1 28 | _ScaleRatioC ("Scale RatioC", float) = 1 29 | 30 | _MainTex ("Font Atlas", 2D) = "white" {} 31 | _TextureWidth ("Texture Width", float) = 512 32 | _TextureHeight ("Texture Height", float) = 512 33 | _GradientScale ("Gradient Scale", float) = 5 34 | _ScaleX ("Scale X", float) = 1 35 | _ScaleY ("Scale Y", float) = 1 36 | _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 37 | _Sharpness ("Sharpness", Range(-1,1)) = 0 38 | 39 | _VertexOffsetX ("Vertex OffsetX", float) = 0 40 | _VertexOffsetY ("Vertex OffsetY", float) = 0 41 | 42 | _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) 43 | _MaskSoftnessX ("Mask SoftnessX", float) = 0 44 | _MaskSoftnessY ("Mask SoftnessY", float) = 0 45 | _MaskTex ("Mask Texture", 2D) = "white" {} 46 | _MaskInverse ("Inverse", float) = 0 47 | _MaskEdgeColor ("Edge Color", Color) = (1,1,1,1) 48 | _MaskEdgeSoftness ("Edge Softness", Range(0, 1)) = 0.01 49 | _MaskWipeControl ("Wipe Position", Range(0, 1)) = 0.5 50 | 51 | _StencilComp ("Stencil Comparison", Float) = 8 52 | _Stencil ("Stencil ID", Float) = 0 53 | _StencilOp ("Stencil Operation", Float) = 0 54 | _StencilWriteMask ("Stencil Write Mask", Float) = 255 55 | _StencilReadMask ("Stencil Read Mask", Float) = 255 56 | 57 | _CullMode ("Cull Mode", Float) = 0 58 | _ColorMask ("Color Mask", Float) = 15 59 | } 60 | 61 | SubShader { 62 | Tags { 63 | "Queue"="Transparent" 64 | "IgnoreProjector"="True" 65 | "RenderType"="Transparent" 66 | } 67 | 68 | Stencil 69 | { 70 | Ref [_Stencil] 71 | Comp [_StencilComp] 72 | Pass [_StencilOp] 73 | ReadMask [_StencilReadMask] 74 | WriteMask [_StencilWriteMask] 75 | } 76 | 77 | Cull [_CullMode] 78 | ZWrite Off 79 | Lighting Off 80 | Fog { Mode Off } 81 | ZTest [unity_GUIZTestMode] 82 | Blend One OneMinusSrcAlpha 83 | ColorMask [_ColorMask] 84 | 85 | Pass { 86 | CGPROGRAM 87 | #pragma vertex VertShader 88 | #pragma fragment PixShader 89 | #pragma shader_feature __ OUTLINE_ON 90 | #pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER 91 | 92 | #pragma multi_compile __ UNITY_UI_CLIP_RECT 93 | #pragma multi_compile __ UNITY_UI_ALPHACLIP 94 | 95 | #include "UnityCG.cginc" 96 | #include "UnityUI.cginc" 97 | #include "TMPro_Properties.cginc" 98 | 99 | #include "TMPro_Mobile.cginc" 100 | 101 | ENDCG 102 | } 103 | } 104 | 105 | CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" 106 | } 107 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Shaders/TMP_SDF-Surface-Mobile.shader: -------------------------------------------------------------------------------- 1 | // Simplified version of the SDF Surface shader : 2 | // - No support for Bevel, Bump or envmap 3 | // - Diffuse only lighting 4 | // - Fully supports only 1 directional light. Other lights can affect it, but it will be per-vertex/SH. 5 | 6 | Shader "TextMeshPro/Mobile/Distance Field (Surface)" { 7 | 8 | Properties { 9 | _FaceTex ("Fill Texture", 2D) = "white" {} 10 | _FaceColor ("Fill Color", Color) = (1,1,1,1) 11 | _FaceDilate ("Face Dilate", Range(-1,1)) = 0 12 | 13 | _OutlineColor ("Outline Color", Color) = (0,0,0,1) 14 | _OutlineTex ("Outline Texture", 2D) = "white" {} 15 | _OutlineWidth ("Outline Thickness", Range(0, 1)) = 0 16 | _OutlineSoftness ("Outline Softness", Range(0,1)) = 0 17 | 18 | _GlowColor ("Color", Color) = (0, 1, 0, 0.5) 19 | _GlowOffset ("Offset", Range(-1,1)) = 0 20 | _GlowInner ("Inner", Range(0,1)) = 0.05 21 | _GlowOuter ("Outer", Range(0,1)) = 0.05 22 | _GlowPower ("Falloff", Range(1, 0)) = 0.75 23 | 24 | _WeightNormal ("Weight Normal", float) = 0 25 | _WeightBold ("Weight Bold", float) = 0.5 26 | 27 | // Should not be directly exposed to the user 28 | _ShaderFlags ("Flags", float) = 0 29 | _ScaleRatioA ("Scale RatioA", float) = 1 30 | _ScaleRatioB ("Scale RatioB", float) = 1 31 | _ScaleRatioC ("Scale RatioC", float) = 1 32 | 33 | _MainTex ("Font Atlas", 2D) = "white" {} 34 | _TextureWidth ("Texture Width", float) = 512 35 | _TextureHeight ("Texture Height", float) = 512 36 | _GradientScale ("Gradient Scale", float) = 5.0 37 | _ScaleX ("Scale X", float) = 1.0 38 | _ScaleY ("Scale Y", float) = 1.0 39 | _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 40 | _Sharpness ("Sharpness", Range(-1,1)) = 0 41 | 42 | _VertexOffsetX ("Vertex OffsetX", float) = 0 43 | _VertexOffsetY ("Vertex OffsetY", float) = 0 44 | 45 | _CullMode ("Cull Mode", Float) = 0 46 | //_MaskCoord ("Mask Coords", vector) = (0,0,0,0) 47 | //_MaskSoftness ("Mask Softness", float) = 0 48 | } 49 | 50 | SubShader { 51 | 52 | Tags { 53 | "Queue"="Transparent" 54 | "IgnoreProjector"="True" 55 | "RenderType"="Transparent" 56 | } 57 | 58 | LOD 300 59 | Cull [_CullMode] 60 | 61 | CGPROGRAM 62 | #pragma surface PixShader Lambert alpha:blend vertex:VertShader noforwardadd nolightmap nodirlightmap 63 | #pragma target 3.0 64 | #pragma shader_feature __ GLOW_ON 65 | 66 | #include "TMPro_Properties.cginc" 67 | #include "TMPro.cginc" 68 | 69 | half _FaceShininess; 70 | half _OutlineShininess; 71 | 72 | struct Input 73 | { 74 | fixed4 color : COLOR; 75 | float2 uv_MainTex; 76 | float2 uv2_FaceTex; 77 | float2 uv2_OutlineTex; 78 | float2 param; // Weight, Scale 79 | float3 viewDirEnv; 80 | }; 81 | 82 | #include "TMPro_Surface.cginc" 83 | 84 | ENDCG 85 | 86 | // Pass to render object as a shadow caster 87 | Pass 88 | { 89 | Name "Caster" 90 | Tags { "LightMode" = "ShadowCaster" } 91 | Offset 1, 1 92 | 93 | Fog {Mode Off} 94 | ZWrite On ZTest LEqual Cull Off 95 | 96 | CGPROGRAM 97 | #pragma vertex vert 98 | #pragma fragment frag 99 | #pragma multi_compile_shadowcaster 100 | #include "UnityCG.cginc" 101 | 102 | struct v2f 103 | { 104 | V2F_SHADOW_CASTER; 105 | float2 uv : TEXCOORD1; 106 | float2 uv2 : TEXCOORD3; 107 | float alphaClip : TEXCOORD2; 108 | }; 109 | 110 | uniform float4 _MainTex_ST; 111 | uniform float4 _OutlineTex_ST; 112 | float _OutlineWidth; 113 | float _FaceDilate; 114 | float _ScaleRatioA; 115 | 116 | v2f vert( appdata_base v ) 117 | { 118 | v2f o; 119 | TRANSFER_SHADOW_CASTER(o) 120 | o.uv = TRANSFORM_TEX(v.texcoord, _MainTex); 121 | o.uv2 = TRANSFORM_TEX(v.texcoord, _OutlineTex); 122 | o.alphaClip = o.alphaClip = (1.0 - _OutlineWidth * _ScaleRatioA - _FaceDilate * _ScaleRatioA) / 2; 123 | return o; 124 | } 125 | 126 | uniform sampler2D _MainTex; 127 | 128 | float4 frag(v2f i) : COLOR 129 | { 130 | fixed4 texcol = tex2D(_MainTex, i.uv).a; 131 | clip(texcol.a - i.alphaClip); 132 | SHADOW_CASTER_FRAGMENT(i) 133 | } 134 | ENDCG 135 | } 136 | } 137 | 138 | CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" 139 | } 140 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Shaders/TMP_SDF-Surface.shader: -------------------------------------------------------------------------------- 1 | Shader "TextMeshPro/Distance Field (Surface)" { 2 | 3 | Properties { 4 | _FaceTex ("Fill Texture", 2D) = "white" {} 5 | _FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0 6 | _FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0 7 | _FaceColor ("Fill Color", Color) = (1,1,1,1) 8 | _FaceDilate ("Face Dilate", Range(-1,1)) = 0 9 | 10 | _OutlineColor ("Outline Color", Color) = (0,0,0,1) 11 | _OutlineTex ("Outline Texture", 2D) = "white" {} 12 | _OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0 13 | _OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0 14 | _OutlineWidth ("Outline Thickness", Range(0, 1)) = 0 15 | _OutlineSoftness ("Outline Softness", Range(0,1)) = 0 16 | 17 | _Bevel ("Bevel", Range(0,1)) = 0.5 18 | _BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0 19 | _BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0 20 | _BevelClamp ("Bevel Clamp", Range(0,1)) = 0 21 | _BevelRoundness ("Bevel Roundness", Range(0,1)) = 0 22 | 23 | _BumpMap ("Normalmap", 2D) = "bump" {} 24 | _BumpOutline ("Bump Outline", Range(0,1)) = 0.5 25 | _BumpFace ("Bump Face", Range(0,1)) = 0.5 26 | 27 | _ReflectFaceColor ("Face Color", Color) = (0,0,0,1) 28 | _ReflectOutlineColor ("Outline Color", Color) = (0,0,0,1) 29 | _Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ } 30 | _EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0) 31 | _SpecColor ("Specular Color", Color) = (0,0,0,1) 32 | 33 | _FaceShininess ("Face Shininess", Range(0,1)) = 0 34 | _OutlineShininess ("Outline Shininess", Range(0,1)) = 0 35 | 36 | _GlowColor ("Color", Color) = (0, 1, 0, 0.5) 37 | _GlowOffset ("Offset", Range(-1,1)) = 0 38 | _GlowInner ("Inner", Range(0,1)) = 0.05 39 | _GlowOuter ("Outer", Range(0,1)) = 0.05 40 | _GlowPower ("Falloff", Range(1, 0)) = 0.75 41 | 42 | _WeightNormal ("Weight Normal", float) = 0 43 | _WeightBold ("Weight Bold", float) = 0.5 44 | 45 | // Should not be directly exposed to the user 46 | _ShaderFlags ("Flags", float) = 0 47 | _ScaleRatioA ("Scale RatioA", float) = 1 48 | _ScaleRatioB ("Scale RatioB", float) = 1 49 | _ScaleRatioC ("Scale RatioC", float) = 1 50 | 51 | _MainTex ("Font Atlas", 2D) = "white" {} 52 | _TextureWidth ("Texture Width", float) = 512 53 | _TextureHeight ("Texture Height", float) = 512 54 | _GradientScale ("Gradient Scale", float) = 5.0 55 | _ScaleX ("Scale X", float) = 1.0 56 | _ScaleY ("Scale Y", float) = 1.0 57 | _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 58 | _Sharpness ("Sharpness", Range(-1,1)) = 0 59 | 60 | _VertexOffsetX ("Vertex OffsetX", float) = 0 61 | _VertexOffsetY ("Vertex OffsetY", float) = 0 62 | 63 | _CullMode ("Cull Mode", Float) = 0 64 | //_MaskCoord ("Mask Coords", vector) = (0,0,0,0) 65 | //_MaskSoftness ("Mask Softness", float) = 0 66 | } 67 | 68 | SubShader { 69 | 70 | Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } 71 | 72 | LOD 300 73 | Cull [_CullMode] 74 | 75 | CGPROGRAM 76 | #pragma surface PixShader BlinnPhong alpha:blend vertex:VertShader nolightmap nodirlightmap 77 | #pragma target 3.0 78 | #pragma shader_feature __ GLOW_ON 79 | #pragma glsl 80 | 81 | #include "TMPro_Properties.cginc" 82 | #include "TMPro.cginc" 83 | 84 | half _FaceShininess; 85 | half _OutlineShininess; 86 | 87 | struct Input 88 | { 89 | fixed4 color : COLOR; 90 | float2 uv_MainTex; 91 | float2 uv2_FaceTex; 92 | float2 uv2_OutlineTex; 93 | float2 param; // Weight, Scale 94 | float3 viewDirEnv; 95 | }; 96 | 97 | 98 | #define BEVEL_ON 1 99 | #include "TMPro_Surface.cginc" 100 | 101 | ENDCG 102 | 103 | // Pass to render object as a shadow caster 104 | Pass 105 | { 106 | Name "Caster" 107 | Tags { "LightMode" = "ShadowCaster" } 108 | Offset 1, 1 109 | 110 | Fog {Mode Off} 111 | ZWrite On 112 | ZTest LEqual 113 | Cull Off 114 | 115 | CGPROGRAM 116 | #pragma vertex vert 117 | #pragma fragment frag 118 | #pragma multi_compile_shadowcaster 119 | #include "UnityCG.cginc" 120 | 121 | struct v2f 122 | { 123 | V2F_SHADOW_CASTER; 124 | float2 uv : TEXCOORD1; 125 | float2 uv2 : TEXCOORD3; 126 | float alphaClip : TEXCOORD2; 127 | }; 128 | 129 | uniform float4 _MainTex_ST; 130 | uniform float4 _OutlineTex_ST; 131 | float _OutlineWidth; 132 | float _FaceDilate; 133 | float _ScaleRatioA; 134 | 135 | v2f vert( appdata_base v ) 136 | { 137 | v2f o; 138 | TRANSFER_SHADOW_CASTER(o) 139 | o.uv = TRANSFORM_TEX(v.texcoord, _MainTex); 140 | o.uv2 = TRANSFORM_TEX(v.texcoord, _OutlineTex); 141 | o.alphaClip = (1.0 - _OutlineWidth * _ScaleRatioA - _FaceDilate * _ScaleRatioA) / 2; 142 | return o; 143 | } 144 | 145 | uniform sampler2D _MainTex; 146 | 147 | float4 frag(v2f i) : COLOR 148 | { 149 | fixed4 texcol = tex2D(_MainTex, i.uv).a; 150 | clip(texcol.a - i.alphaClip); 151 | SHADOW_CASTER_FRAGMENT(i) 152 | } 153 | ENDCG 154 | } 155 | } 156 | 157 | CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" 158 | } 159 | 160 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Shaders/TMP_Sprite.shader: -------------------------------------------------------------------------------- 1 | Shader "TextMeshPro/Sprite" 2 | { 3 | Properties 4 | { 5 | _MainTex ("Sprite Texture", 2D) = "white" {} 6 | _Color ("Tint", Color) = (1,1,1,1) 7 | 8 | _StencilComp ("Stencil Comparison", Float) = 8 9 | _Stencil ("Stencil ID", Float) = 0 10 | _StencilOp ("Stencil Operation", Float) = 0 11 | _StencilWriteMask ("Stencil Write Mask", Float) = 255 12 | _StencilReadMask ("Stencil Read Mask", Float) = 255 13 | 14 | _CullMode ("Cull Mode", Float) = 0 15 | _ColorMask ("Color Mask", Float) = 15 16 | _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) 17 | 18 | [Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0 19 | } 20 | 21 | SubShader 22 | { 23 | Tags 24 | { 25 | "Queue"="Transparent" 26 | "IgnoreProjector"="True" 27 | "RenderType"="Transparent" 28 | "PreviewType"="Plane" 29 | "CanUseSpriteAtlas"="True" 30 | } 31 | 32 | Stencil 33 | { 34 | Ref [_Stencil] 35 | Comp [_StencilComp] 36 | Pass [_StencilOp] 37 | ReadMask [_StencilReadMask] 38 | WriteMask [_StencilWriteMask] 39 | } 40 | 41 | Cull [_CullMode] 42 | Lighting Off 43 | ZWrite Off 44 | ZTest [unity_GUIZTestMode] 45 | Blend SrcAlpha OneMinusSrcAlpha 46 | ColorMask [_ColorMask] 47 | 48 | Pass 49 | { 50 | Name "Default" 51 | CGPROGRAM 52 | #pragma vertex vert 53 | #pragma fragment frag 54 | #pragma target 2.0 55 | 56 | #include "UnityCG.cginc" 57 | #include "UnityUI.cginc" 58 | 59 | #pragma multi_compile __ UNITY_UI_CLIP_RECT 60 | #pragma multi_compile __ UNITY_UI_ALPHACLIP 61 | 62 | struct appdata_t 63 | { 64 | float4 vertex : POSITION; 65 | float4 color : COLOR; 66 | float2 texcoord : TEXCOORD0; 67 | UNITY_VERTEX_INPUT_INSTANCE_ID 68 | }; 69 | 70 | struct v2f 71 | { 72 | float4 vertex : SV_POSITION; 73 | fixed4 color : COLOR; 74 | float2 texcoord : TEXCOORD0; 75 | float4 worldPosition : TEXCOORD1; 76 | float4 mask : TEXCOORD2; 77 | UNITY_VERTEX_OUTPUT_STEREO 78 | }; 79 | 80 | sampler2D _MainTex; 81 | fixed4 _Color; 82 | fixed4 _TextureSampleAdd; 83 | float4 _ClipRect; 84 | float4 _MainTex_ST; 85 | float _UIMaskSoftnessX; 86 | float _UIMaskSoftnessY; 87 | int _UIVertexColorAlwaysGammaSpace; 88 | 89 | v2f vert(appdata_t v) 90 | { 91 | v2f OUT; 92 | UNITY_SETUP_INSTANCE_ID(v); 93 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT); 94 | float4 vPosition = UnityObjectToClipPos(v.vertex); 95 | OUT.worldPosition = v.vertex; 96 | OUT.vertex = vPosition; 97 | 98 | float2 pixelSize = vPosition.w; 99 | pixelSize /= abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy)); 100 | 101 | float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); 102 | OUT.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex); 103 | OUT.mask = half4(v.vertex.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_UIMaskSoftnessX, _UIMaskSoftnessY) + abs(pixelSize.xy))); 104 | 105 | if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace()) 106 | { 107 | v.color.rgb = UIGammaToLinear(v.color.rgb); 108 | } 109 | OUT.color = v.color * _Color; 110 | return OUT; 111 | } 112 | 113 | fixed4 frag(v2f IN) : SV_Target 114 | { 115 | half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color; 116 | 117 | #if UNITY_UI_CLIP_RECT 118 | half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw); 119 | color *= m.x * m.y; 120 | #endif 121 | 122 | #ifdef UNITY_UI_ALPHACLIP 123 | clip (color.a - 0.001); 124 | #endif 125 | 126 | return color; 127 | } 128 | ENDCG 129 | } 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Shaders/TMPro.cginc: -------------------------------------------------------------------------------- 1 | float2 UnpackUV(float uv) 2 | { 3 | float2 output; 4 | output.x = floor(uv / 4096); 5 | output.y = uv - 4096 * output.x; 6 | 7 | return output * 0.001953125; 8 | } 9 | 10 | fixed4 GetColor(half d, fixed4 faceColor, fixed4 outlineColor, half outline, half softness) 11 | { 12 | half faceAlpha = 1-saturate((d - outline * 0.5 + softness * 0.5) / (1.0 + softness)); 13 | half outlineAlpha = saturate((d + outline * 0.5)) * sqrt(min(1.0, outline)); 14 | 15 | faceColor.rgb *= faceColor.a; 16 | outlineColor.rgb *= outlineColor.a; 17 | 18 | faceColor = lerp(faceColor, outlineColor, outlineAlpha); 19 | 20 | faceColor *= faceAlpha; 21 | 22 | return faceColor; 23 | } 24 | 25 | float3 GetSurfaceNormal(float4 h, float bias) 26 | { 27 | bool raisedBevel = step(1, fmod(_ShaderFlags, 2)); 28 | 29 | h += bias+_BevelOffset; 30 | 31 | float bevelWidth = max(.01, _OutlineWidth+_BevelWidth); 32 | 33 | // Track outline 34 | h -= .5; 35 | h /= bevelWidth; 36 | h = saturate(h+.5); 37 | 38 | if(raisedBevel) h = 1 - abs(h*2.0 - 1.0); 39 | h = lerp(h, sin(h*3.141592/2.0), _BevelRoundness); 40 | h = min(h, 1.0-_BevelClamp); 41 | h *= _Bevel * bevelWidth * _GradientScale * -2.0; 42 | 43 | float3 va = normalize(float3(1.0, 0.0, h.y - h.x)); 44 | float3 vb = normalize(float3(0.0, -1.0, h.w - h.z)); 45 | 46 | return cross(va, vb); 47 | } 48 | 49 | float3 GetSurfaceNormal(float2 uv, float bias, float3 delta) 50 | { 51 | // Read "height field" 52 | float4 h = {tex2D(_MainTex, uv - delta.xz).a, 53 | tex2D(_MainTex, uv + delta.xz).a, 54 | tex2D(_MainTex, uv - delta.zy).a, 55 | tex2D(_MainTex, uv + delta.zy).a}; 56 | 57 | return GetSurfaceNormal(h, bias); 58 | } 59 | 60 | float3 GetSpecular(float3 n, float3 l) 61 | { 62 | float spec = pow(max(0.0, dot(n, l)), _Reflectivity); 63 | return _SpecularColor.rgb * spec * _SpecularPower; 64 | } 65 | 66 | float4 GetGlowColor(float d, float scale) 67 | { 68 | float glow = d - (_GlowOffset*_ScaleRatioB) * 0.5 * scale; 69 | float t = lerp(_GlowInner, (_GlowOuter * _ScaleRatioB), step(0.0, glow)) * 0.5 * scale; 70 | glow = saturate(abs(glow/(1.0 + t))); 71 | glow = 1.0-pow(glow, _GlowPower); 72 | glow *= sqrt(min(1.0, t)); // Fade off glow thinner than 1 screen pixel 73 | return float4(_GlowColor.rgb, saturate(_GlowColor.a * glow * 2)); 74 | } 75 | 76 | float4 BlendARGB(float4 overlying, float4 underlying) 77 | { 78 | overlying.rgb *= overlying.a; 79 | underlying.rgb *= underlying.a; 80 | float3 blended = overlying.rgb + ((1-overlying.a)*underlying.rgb); 81 | float alpha = underlying.a + (1-underlying.a)*overlying.a; 82 | return float4(blended, alpha); 83 | } 84 | 85 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Shaders/TMPro_Properties.cginc: -------------------------------------------------------------------------------- 1 | // UI Editable properties 2 | uniform sampler2D _FaceTex; // Alpha : Signed Distance 3 | uniform float _FaceUVSpeedX; 4 | uniform float _FaceUVSpeedY; 5 | uniform fixed4 _FaceColor; // RGBA : Color + Opacity 6 | uniform float _FaceDilate; // v[ 0, 1] 7 | uniform float _OutlineSoftness; // v[ 0, 1] 8 | 9 | uniform sampler2D _OutlineTex; // RGBA : Color + Opacity 10 | uniform float _OutlineUVSpeedX; 11 | uniform float _OutlineUVSpeedY; 12 | uniform fixed4 _OutlineColor; // RGBA : Color + Opacity 13 | uniform float _OutlineWidth; // v[ 0, 1] 14 | 15 | uniform float _Bevel; // v[ 0, 1] 16 | uniform float _BevelOffset; // v[-1, 1] 17 | uniform float _BevelWidth; // v[-1, 1] 18 | uniform float _BevelClamp; // v[ 0, 1] 19 | uniform float _BevelRoundness; // v[ 0, 1] 20 | 21 | uniform sampler2D _BumpMap; // Normal map 22 | uniform float _BumpOutline; // v[ 0, 1] 23 | uniform float _BumpFace; // v[ 0, 1] 24 | 25 | uniform samplerCUBE _Cube; // Cube / sphere map 26 | uniform fixed4 _ReflectFaceColor; // RGB intensity 27 | uniform fixed4 _ReflectOutlineColor; 28 | //uniform float _EnvTiltX; // v[-1, 1] 29 | //uniform float _EnvTiltY; // v[-1, 1] 30 | uniform float3 _EnvMatrixRotation; 31 | uniform float4x4 _EnvMatrix; 32 | 33 | uniform fixed4 _SpecularColor; // RGB intensity 34 | uniform float _LightAngle; // v[ 0,Tau] 35 | uniform float _SpecularPower; // v[ 0, 1] 36 | uniform float _Reflectivity; // v[ 5, 15] 37 | uniform float _Diffuse; // v[ 0, 1] 38 | uniform float _Ambient; // v[ 0, 1] 39 | 40 | uniform fixed4 _UnderlayColor; // RGBA : Color + Opacity 41 | uniform float _UnderlayOffsetX; // v[-1, 1] 42 | uniform float _UnderlayOffsetY; // v[-1, 1] 43 | uniform float _UnderlayDilate; // v[-1, 1] 44 | uniform float _UnderlaySoftness; // v[ 0, 1] 45 | 46 | uniform fixed4 _GlowColor; // RGBA : Color + Intesity 47 | uniform float _GlowOffset; // v[-1, 1] 48 | uniform float _GlowOuter; // v[ 0, 1] 49 | uniform float _GlowInner; // v[ 0, 1] 50 | uniform float _GlowPower; // v[ 1, 1/(1+4*4)] 51 | 52 | // API Editable properties 53 | uniform float _ShaderFlags; 54 | uniform float _WeightNormal; 55 | uniform float _WeightBold; 56 | 57 | uniform float _ScaleRatioA; 58 | uniform float _ScaleRatioB; 59 | uniform float _ScaleRatioC; 60 | 61 | uniform float _VertexOffsetX; 62 | uniform float _VertexOffsetY; 63 | 64 | //uniform float _UseClipRect; 65 | uniform float _MaskID; 66 | uniform sampler2D _MaskTex; 67 | uniform float4 _MaskCoord; 68 | uniform float4 _ClipRect; // bottom left(x,y) : top right(z,w) 69 | uniform float _MaskSoftnessX; 70 | uniform float _MaskSoftnessY; 71 | 72 | // Font Atlas properties 73 | uniform sampler2D _MainTex; 74 | uniform float _TextureWidth; 75 | uniform float _TextureHeight; 76 | uniform float _GradientScale; 77 | uniform float _ScaleX; 78 | uniform float _ScaleY; 79 | uniform float _PerspectiveFilter; 80 | uniform float _Sharpness; 81 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Shaders/TMPro_Surface.cginc: -------------------------------------------------------------------------------- 1 | void VertShader(inout appdata_full v, out Input data) 2 | { 3 | v.vertex.x += _VertexOffsetX; 4 | v.vertex.y += _VertexOffsetY; 5 | 6 | UNITY_INITIALIZE_OUTPUT(Input, data); 7 | 8 | float bold = step(v.texcoord.w, 0); 9 | 10 | // Generate normal for backface 11 | float3 view = ObjSpaceViewDir(v.vertex); 12 | v.normal *= sign(dot(v.normal, view)); 13 | 14 | #if USE_DERIVATIVE 15 | data.param.y = 1; 16 | #else 17 | float4 vert = v.vertex; 18 | float4 vPosition = UnityObjectToClipPos(vert); 19 | float2 pixelSize = vPosition.w; 20 | 21 | pixelSize /= float2(_ScaleX, _ScaleY) * mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy); 22 | float scale = rsqrt(dot(pixelSize, pixelSize)); 23 | scale *= abs(v.texcoord.w) * _GradientScale * (_Sharpness + 1); 24 | scale = lerp(scale * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(v.normal.xyz), normalize(WorldSpaceViewDir(vert))))); 25 | data.param.y = scale; 26 | #endif 27 | 28 | data.param.x = (lerp(_WeightNormal, _WeightBold, bold) / 4.0 + _FaceDilate) * _ScaleRatioA * 0.5; // 29 | data.viewDirEnv = mul((float3x3)_EnvMatrix, WorldSpaceViewDir(v.vertex)); 30 | } 31 | 32 | void PixShader(Input input, inout SurfaceOutput o) 33 | { 34 | 35 | #if USE_DERIVATIVE 36 | float2 pixelSize = float2(ddx(input.uv_MainTex.y), ddy(input.uv_MainTex.y)); 37 | pixelSize *= _TextureWidth * .75; 38 | float scale = rsqrt(dot(pixelSize, pixelSize)) * _GradientScale * (_Sharpness + 1); 39 | #else 40 | float scale = input.param.y; 41 | #endif 42 | 43 | // Signed distance 44 | float c = tex2D(_MainTex, input.uv_MainTex).a; 45 | float sd = (.5 - c - input.param.x) * scale + .5; 46 | float outline = _OutlineWidth*_ScaleRatioA * scale; 47 | float softness = _OutlineSoftness*_ScaleRatioA * scale; 48 | 49 | // Color & Alpha 50 | float4 faceColor = _FaceColor; 51 | float4 outlineColor = _OutlineColor; 52 | faceColor *= input.color; 53 | outlineColor.a *= input.color.a; 54 | faceColor *= tex2D(_FaceTex, float2(input.uv2_FaceTex.x + _FaceUVSpeedX * _Time.y, input.uv2_FaceTex.y + _FaceUVSpeedY * _Time.y)); 55 | outlineColor *= tex2D(_OutlineTex, float2(input.uv2_OutlineTex.x + _OutlineUVSpeedX * _Time.y, input.uv2_OutlineTex.y + _OutlineUVSpeedY * _Time.y)); 56 | faceColor = GetColor(sd, faceColor, outlineColor, outline, softness); 57 | faceColor.rgb /= max(faceColor.a, 0.0001); 58 | 59 | #if BEVEL_ON 60 | float3 delta = float3(1.0 / _TextureWidth, 1.0 / _TextureHeight, 0.0); 61 | 62 | float4 smp4x = {tex2D(_MainTex, input.uv_MainTex - delta.xz).a, 63 | tex2D(_MainTex, input.uv_MainTex + delta.xz).a, 64 | tex2D(_MainTex, input.uv_MainTex - delta.zy).a, 65 | tex2D(_MainTex, input.uv_MainTex + delta.zy).a }; 66 | 67 | // Face Normal 68 | float3 n = GetSurfaceNormal(smp4x, input.param.x); 69 | 70 | // Bumpmap 71 | float3 bump = UnpackNormal(tex2D(_BumpMap, input.uv2_FaceTex.xy)).xyz; 72 | bump *= lerp(_BumpFace, _BumpOutline, saturate(sd + outline * 0.5)); 73 | bump = lerp(float3(0, 0, 1), bump, faceColor.a); 74 | n = normalize(n - bump); 75 | 76 | // Cubemap reflection 77 | fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDirEnv, mul((float3x3)unity_ObjectToWorld, n))); 78 | float3 emission = reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a; 79 | #else 80 | float3 n = float3(0, 0, -1); 81 | float3 emission = float3(0, 0, 0); 82 | #endif 83 | 84 | #if GLOW_ON 85 | float4 glowColor = GetGlowColor(sd, scale); 86 | glowColor.a *= input.color.a; 87 | emission += glowColor.rgb*glowColor.a; 88 | faceColor = BlendARGB(glowColor, faceColor); 89 | faceColor.rgb /= max(faceColor.a, 0.0001); 90 | #endif 91 | 92 | // Set Standard output structure 93 | o.Albedo = faceColor.rgb; 94 | o.Normal = -n; 95 | o.Emission = emission; 96 | o.Specular = lerp(_FaceShininess, _OutlineShininess, saturate(sd + outline * 0.5)); 97 | o.Gloss = 1; 98 | o.Alpha = faceColor.a; 99 | } 100 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Sprites/EmojiOne Attribution.txt: -------------------------------------------------------------------------------- 1 | This sample of beautiful emojis are provided by EmojiOne https://www.emojione.com/ 2 | 3 | Please visit their website to view the complete set of their emojis and review their licensing terms. -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Sprites/EmojiOne.json: -------------------------------------------------------------------------------- 1 | {"frames": [ 2 | 3 | { 4 | "filename": "1f60a.png", 5 | "frame": {"x":0,"y":0,"w":128,"h":128}, 6 | "rotated": false, 7 | "trimmed": false, 8 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, 9 | "sourceSize": {"w":128,"h":128}, 10 | "pivot": {"x":0.5,"y":0.5} 11 | }, 12 | { 13 | "filename": "1f60b.png", 14 | "frame": {"x":128,"y":0,"w":128,"h":128}, 15 | "rotated": false, 16 | "trimmed": false, 17 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, 18 | "sourceSize": {"w":128,"h":128}, 19 | "pivot": {"x":0.5,"y":0.5} 20 | }, 21 | { 22 | "filename": "1f60d.png", 23 | "frame": {"x":256,"y":0,"w":128,"h":128}, 24 | "rotated": false, 25 | "trimmed": false, 26 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, 27 | "sourceSize": {"w":128,"h":128}, 28 | "pivot": {"x":0.5,"y":0.5} 29 | }, 30 | { 31 | "filename": "1f60e.png", 32 | "frame": {"x":384,"y":0,"w":128,"h":128}, 33 | "rotated": false, 34 | "trimmed": false, 35 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, 36 | "sourceSize": {"w":128,"h":128}, 37 | "pivot": {"x":0.5,"y":0.5} 38 | }, 39 | { 40 | "filename": "1f600.png", 41 | "frame": {"x":0,"y":128,"w":128,"h":128}, 42 | "rotated": false, 43 | "trimmed": false, 44 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, 45 | "sourceSize": {"w":128,"h":128}, 46 | "pivot": {"x":0.5,"y":0.5} 47 | }, 48 | { 49 | "filename": "1f601.png", 50 | "frame": {"x":128,"y":128,"w":128,"h":128}, 51 | "rotated": false, 52 | "trimmed": false, 53 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, 54 | "sourceSize": {"w":128,"h":128}, 55 | "pivot": {"x":0.5,"y":0.5} 56 | }, 57 | { 58 | "filename": "1f602.png", 59 | "frame": {"x":256,"y":128,"w":128,"h":128}, 60 | "rotated": false, 61 | "trimmed": false, 62 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, 63 | "sourceSize": {"w":128,"h":128}, 64 | "pivot": {"x":0.5,"y":0.5} 65 | }, 66 | { 67 | "filename": "1f603.png", 68 | "frame": {"x":384,"y":128,"w":128,"h":128}, 69 | "rotated": false, 70 | "trimmed": false, 71 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, 72 | "sourceSize": {"w":128,"h":128}, 73 | "pivot": {"x":0.5,"y":0.5} 74 | }, 75 | { 76 | "filename": "1f604.png", 77 | "frame": {"x":0,"y":256,"w":128,"h":128}, 78 | "rotated": false, 79 | "trimmed": false, 80 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, 81 | "sourceSize": {"w":128,"h":128}, 82 | "pivot": {"x":0.5,"y":0.5} 83 | }, 84 | { 85 | "filename": "1f605.png", 86 | "frame": {"x":128,"y":256,"w":128,"h":128}, 87 | "rotated": false, 88 | "trimmed": false, 89 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, 90 | "sourceSize": {"w":128,"h":128}, 91 | "pivot": {"x":0.5,"y":0.5} 92 | }, 93 | { 94 | "filename": "1f606.png", 95 | "frame": {"x":256,"y":256,"w":128,"h":128}, 96 | "rotated": false, 97 | "trimmed": false, 98 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, 99 | "sourceSize": {"w":128,"h":128}, 100 | "pivot": {"x":0.5,"y":0.5} 101 | }, 102 | { 103 | "filename": "1f609.png", 104 | "frame": {"x":384,"y":256,"w":128,"h":128}, 105 | "rotated": false, 106 | "trimmed": false, 107 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, 108 | "sourceSize": {"w":128,"h":128}, 109 | "pivot": {"x":0.5,"y":0.5} 110 | }, 111 | { 112 | "filename": "1f618.png", 113 | "frame": {"x":0,"y":384,"w":128,"h":128}, 114 | "rotated": false, 115 | "trimmed": false, 116 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, 117 | "sourceSize": {"w":128,"h":128}, 118 | "pivot": {"x":0.5,"y":0.5} 119 | }, 120 | { 121 | "filename": "1f923.png", 122 | "frame": {"x":128,"y":384,"w":128,"h":128}, 123 | "rotated": false, 124 | "trimmed": false, 125 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, 126 | "sourceSize": {"w":128,"h":128}, 127 | "pivot": {"x":0.5,"y":0.5} 128 | }, 129 | { 130 | "filename": "263a.png", 131 | "frame": {"x":256,"y":384,"w":128,"h":128}, 132 | "rotated": false, 133 | "trimmed": false, 134 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, 135 | "sourceSize": {"w":128,"h":128}, 136 | "pivot": {"x":0.5,"y":0.5} 137 | }, 138 | { 139 | "filename": "2639.png", 140 | "frame": {"x":384,"y":384,"w":128,"h":128}, 141 | "rotated": false, 142 | "trimmed": false, 143 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, 144 | "sourceSize": {"w":128,"h":128}, 145 | "pivot": {"x":0.5,"y":0.5} 146 | }], 147 | "meta": { 148 | "app": "http://www.codeandweb.com/texturepacker", 149 | "version": "1.0", 150 | "image": "EmojiOne.png", 151 | "format": "RGBA8888", 152 | "size": {"w":512,"h":512}, 153 | "scale": "1", 154 | "smartupdate": "$TexturePacker:SmartUpdate:196a26a2e149d875b91ffc8fa3581e76:fc928c7e275404b7e0649307410475cb:424723c3774975ddb2053fd5c4b85f6e$" 155 | } 156 | } 157 | -------------------------------------------------------------------------------- /Assets/TextMesh Pro/Sprites/EmojiOne.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dotus-git/Unity-Monads/36a6b143396f3301d6f8e0b1979494980cb384c6/Assets/TextMesh Pro/Sprites/EmojiOne.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 0 20 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0.1 18 | m_ClothInterCollisionStiffness: 0.2 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ClothGravity: {x: 0, y: -9.81, z: 0} 26 | m_ContactPairsMode: 0 27 | m_BroadphaseType: 0 28 | m_WorldBounds: 29 | m_Center: {x: 0, y: 0, z: 0} 30 | m_Extent: {x: 250, y: 250, z: 250} 31 | m_WorldSubdivisions: 8 32 | m_FrictionType: 0 33 | m_EnableEnhancedDeterminism: 0 34 | m_EnableUnifiedHeightmaps: 1 35 | m_SolverType: 0 36 | m_DefaultMaxAngularSpeed: 50 37 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/Scenes/SimpleUses.unity 10 | guid: 8c9cfa26abfee488c85f1582747f6a02 11 | m_configObjects: 12 | com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 2bcd2660ca9b64942af0de543d8d7100, type: 3} 13 | m_UseUCBPForAssetBundles: 0 14 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_SerializationMode: 2 8 | m_LineEndingsForNewScripts: 0 9 | m_DefaultBehaviorMode: 1 10 | m_PrefabRegularEnvironment: {fileID: 0} 11 | m_PrefabUIEnvironment: {fileID: 0} 12 | m_SpritePackerMode: 5 13 | m_SpritePackerCacheSize: 10 14 | m_SpritePackerPaddingPower: 1 15 | m_Bc7TextureCompressor: 0 16 | m_EtcTextureCompressorBehavior: 1 17 | m_EtcTextureFastCompressor: 1 18 | m_EtcTextureNormalCompressor: 2 19 | m_EtcTextureBestCompressor: 4 20 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;asmref;rsp 21 | m_ProjectGenerationRootNamespace: 22 | m_EnableTextureStreamingInEditMode: 1 23 | m_EnableTextureStreamingInPlayMode: 1 24 | m_EnableEditorAsyncCPUTextureLoading: 0 25 | m_AsyncShaderCompilation: 1 26 | m_PrefabModeAllowAutoSave: 1 27 | m_EnterPlayModeOptionsEnabled: 1 28 | m_EnterPlayModeOptions: 3 29 | m_GameObjectNamingDigits: 2 30 | m_GameObjectNamingScheme: 1 31 | m_AssetNamingUsesSpace: 1 32 | m_InspectorUseIMGUIDefaultInspector: 0 33 | m_UseLegacyProbeSampleCount: 0 34 | m_SerializeInlineMappingsOnOneLine: 1 35 | m_DisableCookiesInLightmapper: 1 36 | m_AssetPipelineMode: 1 37 | m_RefreshImportMode: 0 38 | m_CacheServerMode: 0 39 | m_CacheServerEndpoint: 40 | m_CacheServerNamespacePrefix: default 41 | m_CacheServerEnableDownload: 1 42 | m_CacheServerEnableUpload: 1 43 | m_CacheServerEnableAuth: 0 44 | m_CacheServerEnableTls: 0 45 | m_CacheServerValidationMode: 2 46 | m_CacheServerDownloadBatchSize: 128 47 | m_EnableEnlightenBakedGI: 0 48 | m_ReferencedClipsExactNaming: 1 49 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 16 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_DepthNormals: 17 | m_Mode: 1 18 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 19 | m_MotionVectors: 20 | m_Mode: 1 21 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 22 | m_LightHalo: 23 | m_Mode: 1 24 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LensFlare: 26 | m_Mode: 1 27 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 28 | m_VideoShadersIncludeMode: 2 29 | m_AlwaysIncludedShaders: 30 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 31 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 32 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} 37 | m_PreloadedShaders: [] 38 | m_PreloadShadersBatchTimeLimit: -1 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 40 | m_CustomRenderPipeline: {fileID: 11400000, guid: 681886c5eb7344803b6206f758bf0b1c, type: 2} 41 | m_TransparencySortMode: 0 42 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 43 | m_DefaultRenderingPath: 1 44 | m_DefaultMobileRenderingPath: 1 45 | m_TierSettings: [] 46 | m_LightmapStripping: 0 47 | m_FogStripping: 0 48 | m_InstancingStripping: 0 49 | m_BrgStripping: 0 50 | m_LightmapKeepPlain: 1 51 | m_LightmapKeepDirCombined: 1 52 | m_LightmapKeepDynamicPlain: 1 53 | m_LightmapKeepDynamicDirCombined: 1 54 | m_LightmapKeepShadowMask: 1 55 | m_LightmapKeepSubtractive: 1 56 | m_FogKeepLinear: 1 57 | m_FogKeepExp: 1 58 | m_FogKeepExp2: 1 59 | m_AlbedoSwatchInfos: [] 60 | m_RenderPipelineGlobalSettingsMap: 61 | UnityEngine.Rendering.Universal.UniversalRenderPipeline: {fileID: 11400000, guid: 93b439a37f63240aca3dd4e01d978a9f, type: 2} 62 | m_LightsUseLinearIntensity: 1 63 | m_LightsUseColorTemperature: 1 64 | m_LogWhenShaderIsCompiled: 0 65 | m_LightProbeOutsideHullStrategy: 0 66 | m_CameraRelativeLightCulling: 0 67 | m_CameraRelativeShadowCulling: 0 68 | -------------------------------------------------------------------------------- /ProjectSettings/MemorySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!387306366 &1 4 | MemorySettings: 5 | m_ObjectHideFlags: 0 6 | m_EditorMemorySettings: 7 | m_MainAllocatorBlockSize: -1 8 | m_ThreadAllocatorBlockSize: -1 9 | m_MainGfxBlockSize: -1 10 | m_ThreadGfxBlockSize: -1 11 | m_CacheBlockSize: -1 12 | m_TypetreeBlockSize: -1 13 | m_ProfilerBlockSize: -1 14 | m_ProfilerEditorBlockSize: -1 15 | m_BucketAllocatorGranularity: -1 16 | m_BucketAllocatorBucketsCount: -1 17 | m_BucketAllocatorBlockSize: -1 18 | m_BucketAllocatorBlockCount: -1 19 | m_ProfilerBucketAllocatorGranularity: -1 20 | m_ProfilerBucketAllocatorBucketsCount: -1 21 | m_ProfilerBucketAllocatorBlockSize: -1 22 | m_ProfilerBucketAllocatorBlockCount: -1 23 | m_TempAllocatorSizeMain: -1 24 | m_JobTempAllocatorBlockSize: -1 25 | m_BackgroundJobTempAllocatorBlockSize: -1 26 | m_JobTempAllocatorReducedBlockSize: -1 27 | m_TempAllocatorSizeGIBakingWorker: -1 28 | m_TempAllocatorSizeNavMeshWorker: -1 29 | m_TempAllocatorSizeAudioWorker: -1 30 | m_TempAllocatorSizeCloudWorker: -1 31 | m_TempAllocatorSizeGfx: -1 32 | m_TempAllocatorSizeJobWorker: -1 33 | m_TempAllocatorSizeBackgroundWorker: -1 34 | m_TempAllocatorSizePreloadManager: -1 35 | m_PlatformMemorySettings: {} 36 | -------------------------------------------------------------------------------- /ProjectSettings/MultiplayerManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!655991488 &1 4 | MultiplayerManager: 5 | m_ObjectHideFlags: 0 6 | m_EnableMultiplayerRoles: 0 7 | m_StrippingTypes: {} 8 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 53 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreReleasePackages: 0 16 | m_AdvancedSettingsExpanded: 1 17 | m_ScopedRegistriesSettingsExpanded: 1 18 | m_SeeAllPackageVersions: 0 19 | m_DismissPreviewPackagesInUse: 0 20 | oneTimeWarningShown: 0 21 | oneTimeDeprecatedPopUpShown: 0 22 | m_Registries: 23 | - m_Id: main 24 | m_Name: 25 | m_Url: https://packages.unity.com 26 | m_Scopes: [] 27 | m_IsDefault: 1 28 | m_Capabilities: 7 29 | m_ConfigSource: 0 30 | m_UserSelectedRegistryName: 31 | m_UserAddingNewScopedRegistry: 0 32 | m_RegistryInfoDraft: 33 | m_Modified: 0 34 | m_ErrorMessage: 35 | m_UserModificationsInstanceId: -886 36 | m_OriginalInstanceId: -888 37 | m_LoadAssets: 0 38 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_SimulationMode: 0 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 1 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 6000.0.29f1 2 | m_EditorVersionWithRevision: 6000.0.29f1 (9fafe5c9db65) 3 | -------------------------------------------------------------------------------- /ProjectSettings/SceneTemplateSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "templatePinStates": [], 3 | "dependencyTypeInfos": [ 4 | { 5 | "userAdded": false, 6 | "type": "UnityEngine.AnimationClip", 7 | "defaultInstantiationMode": 0 8 | }, 9 | { 10 | "userAdded": false, 11 | "type": "UnityEditor.Animations.AnimatorController", 12 | "defaultInstantiationMode": 0 13 | }, 14 | { 15 | "userAdded": false, 16 | "type": "UnityEngine.AnimatorOverrideController", 17 | "defaultInstantiationMode": 0 18 | }, 19 | { 20 | "userAdded": false, 21 | "type": "UnityEditor.Audio.AudioMixerController", 22 | "defaultInstantiationMode": 0 23 | }, 24 | { 25 | "userAdded": false, 26 | "type": "UnityEngine.ComputeShader", 27 | "defaultInstantiationMode": 1 28 | }, 29 | { 30 | "userAdded": false, 31 | "type": "UnityEngine.Cubemap", 32 | "defaultInstantiationMode": 0 33 | }, 34 | { 35 | "userAdded": false, 36 | "type": "UnityEngine.GameObject", 37 | "defaultInstantiationMode": 0 38 | }, 39 | { 40 | "userAdded": false, 41 | "type": "UnityEditor.LightingDataAsset", 42 | "defaultInstantiationMode": 0 43 | }, 44 | { 45 | "userAdded": false, 46 | "type": "UnityEngine.LightingSettings", 47 | "defaultInstantiationMode": 0 48 | }, 49 | { 50 | "userAdded": false, 51 | "type": "UnityEngine.Material", 52 | "defaultInstantiationMode": 0 53 | }, 54 | { 55 | "userAdded": false, 56 | "type": "UnityEditor.MonoScript", 57 | "defaultInstantiationMode": 1 58 | }, 59 | { 60 | "userAdded": false, 61 | "type": "UnityEngine.PhysicsMaterial", 62 | "defaultInstantiationMode": 0 63 | }, 64 | { 65 | "userAdded": false, 66 | "type": "UnityEngine.PhysicsMaterial2D", 67 | "defaultInstantiationMode": 0 68 | }, 69 | { 70 | "userAdded": false, 71 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile", 72 | "defaultInstantiationMode": 0 73 | }, 74 | { 75 | "userAdded": false, 76 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessResources", 77 | "defaultInstantiationMode": 0 78 | }, 79 | { 80 | "userAdded": false, 81 | "type": "UnityEngine.Rendering.VolumeProfile", 82 | "defaultInstantiationMode": 0 83 | }, 84 | { 85 | "userAdded": false, 86 | "type": "UnityEditor.SceneAsset", 87 | "defaultInstantiationMode": 1 88 | }, 89 | { 90 | "userAdded": false, 91 | "type": "UnityEngine.Shader", 92 | "defaultInstantiationMode": 1 93 | }, 94 | { 95 | "userAdded": false, 96 | "type": "UnityEngine.ShaderVariantCollection", 97 | "defaultInstantiationMode": 1 98 | }, 99 | { 100 | "userAdded": false, 101 | "type": "UnityEngine.Texture", 102 | "defaultInstantiationMode": 0 103 | }, 104 | { 105 | "userAdded": false, 106 | "type": "UnityEngine.Texture2D", 107 | "defaultInstantiationMode": 0 108 | }, 109 | { 110 | "userAdded": false, 111 | "type": "UnityEngine.Timeline.TimelineAsset", 112 | "defaultInstantiationMode": 0 113 | } 114 | ], 115 | "defaultDependencyTypeInfo": { 116 | "userAdded": false, 117 | "type": "", 118 | "defaultInstantiationMode": 1 119 | }, 120 | "newSceneOverride": 0 121 | } -------------------------------------------------------------------------------- /ProjectSettings/ShaderGraphSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 53 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: de02f9e1d18f588468e474319d09a723, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | shaderVariantLimit: 128 16 | customInterpolatorErrorThreshold: 32 17 | customInterpolatorWarningThreshold: 16 18 | customHeatmapValues: {fileID: 0} 19 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /ProjectSettings/URPProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 247994e1f5a72c2419c26a37e9334c01, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_LastMaterialVersion: 9 16 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_DashboardUrl: https://dashboard.unity3d.com 13 | m_TestInitMode: 0 14 | CrashReportingSettings: 15 | m_EventUrl: https://perf-events.cloud.unity3d.com 16 | m_Enabled: 0 17 | m_LogBufferSize: 10 18 | m_CaptureEditorExceptions: 1 19 | UnityPurchasingSettings: 20 | m_Enabled: 0 21 | m_TestMode: 0 22 | UnityAnalyticsSettings: 23 | m_Enabled: 0 24 | m_TestMode: 0 25 | m_InitializeOnStartup: 1 26 | m_PackageRequiringCoreStatsPresent: 0 27 | UnityAdsSettings: 28 | m_Enabled: 0 29 | m_InitializeOnStartup: 1 30 | m_TestMode: 0 31 | m_IosGameId: 32 | m_AndroidGameId: 33 | m_GameIds: {} 34 | m_GameId: 35 | PerformanceReportingSettings: 36 | m_Enabled: 0 37 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | -------------------------------------------------------------------------------- /ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_TrackPackagesOutsideProject: 0 8 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } --------------------------------------------------------------------------------