건물 건설 모드 및 건설 인터랙션

This commit is contained in:
2026-01-12 17:21:07 +09:00
parent 87340317ab
commit c75c5bd868
25 changed files with 3747 additions and 311 deletions

View File

@@ -72,7 +72,7 @@ using UnityEngine.InputSystem.Utilities;
/// }
/// </code>
/// </example>
public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
{
/// <summary>
/// Provides access to the underlying asset instance.
@@ -82,7 +82,7 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
/// <summary>
/// Constructs a new instance.
/// </summary>
public @InputSystem_Actions()
public @PlayerInputActions()
{
asset = InputActionAsset.FromJson(@"{
""version"": 1,
@@ -110,20 +110,11 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
""interactions"": """",
""initialStateCheck"": true
},
{
""name"": ""Attack"",
""type"": ""Button"",
""id"": ""6c2ab1b8-8984-453a-af3d-a3c78ae1679a"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""Interact"",
""type"": ""Button"",
""id"": ""852140f2-7766-474d-8707-702459ba45f3"",
""expectedControlType"": ""Button"",
""expectedControlType"": """",
""processors"": """",
""interactions"": ""Hold"",
""initialStateCheck"": false
@@ -141,7 +132,7 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
""name"": ""Jump"",
""type"": ""Button"",
""id"": ""f1ba0d36-48eb-4cd5-b651-1c94a6531f70"",
""expectedControlType"": ""Button"",
""expectedControlType"": """",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
@@ -150,7 +141,7 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
""name"": ""Previous"",
""type"": ""Button"",
""id"": ""2776c80d-3c14-4091-8c56-d04ced07a2b0"",
""expectedControlType"": ""Button"",
""expectedControlType"": """",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
@@ -172,6 +163,33 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""ToggleBuild"",
""type"": ""Button"",
""id"": ""d0be6772-d106-4d28-95db-42e006045d09"",
""expectedControlType"": """",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""Build"",
""type"": ""Button"",
""id"": ""4882dd65-9e5d-429b-8920-d024e1dc7f40"",
""expectedControlType"": """",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""Cancel"",
""type"": ""Button"",
""id"": ""15a06032-857d-4655-9d22-c60046a9db21"",
""expectedControlType"": """",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
}
],
""bindings"": [
@@ -340,72 +358,6 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""143bb1cd-cc10-4eca-a2f0-a3664166fe91"",
""path"": ""<Gamepad>/buttonWest"",
""interactions"": """",
""processors"": """",
""groups"": "";Gamepad"",
""action"": ""Attack"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""05f6913d-c316-48b2-a6bb-e225f14c7960"",
""path"": ""<Mouse>/leftButton"",
""interactions"": """",
""processors"": """",
""groups"": "";Keyboard&Mouse"",
""action"": ""Attack"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""886e731e-7071-4ae4-95c0-e61739dad6fd"",
""path"": ""<Touchscreen>/primaryTouch/tap"",
""interactions"": """",
""processors"": """",
""groups"": "";Touch"",
""action"": ""Attack"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""ee3d0cd2-254e-47a7-a8cb-bc94d9658c54"",
""path"": ""<Joystick>/trigger"",
""interactions"": """",
""processors"": """",
""groups"": ""Joystick"",
""action"": ""Attack"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""8255d333-5683-4943-a58a-ccb207ff1dce"",
""path"": ""<XRController>/{PrimaryAction}"",
""interactions"": """",
""processors"": """",
""groups"": ""XR"",
""action"": ""Attack"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""b3c1c7f0-bd20-4ee7-a0f1-899b24bca6d7"",
""path"": ""<Keyboard>/enter"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard&Mouse"",
""action"": ""Attack"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""cbac6039-9c09-46a1-b5f2-4e5124ccb5ed"",
@@ -559,6 +511,50 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
""action"": ""Crouch"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""b0c31ff4-28e1-4221-8a1a-4ce414c9c8a9"",
""path"": ""<Keyboard>/b"",
""interactions"": """",
""processors"": """",
""groups"": "";Keyboard&Mouse"",
""action"": ""ToggleBuild"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""4a4508a3-a4bc-4f26-85d2-53b4364920c5"",
""path"": ""<Mouse>/leftButton"",
""interactions"": """",
""processors"": """",
""groups"": "";Keyboard&Mouse"",
""action"": ""Build"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""ea2b9aa8-a065-48f0-8de0-037adf5d260f"",
""path"": ""<Mouse>/rightButton"",
""interactions"": """",
""processors"": """",
""groups"": "";Keyboard&Mouse"",
""action"": ""Cancel"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""798d6431-b2de-4aad-b19c-05895bdb375b"",
""path"": ""<Keyboard>/escape"",
""interactions"": """",
""processors"": """",
""groups"": "";Keyboard&Mouse"",
""action"": ""Cancel"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
},
@@ -1146,13 +1142,15 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
m_Player = asset.FindActionMap("Player", throwIfNotFound: true);
m_Player_Move = m_Player.FindAction("Move", throwIfNotFound: true);
m_Player_Look = m_Player.FindAction("Look", throwIfNotFound: true);
m_Player_Attack = m_Player.FindAction("Attack", throwIfNotFound: true);
m_Player_Interact = m_Player.FindAction("Interact", throwIfNotFound: true);
m_Player_Crouch = m_Player.FindAction("Crouch", throwIfNotFound: true);
m_Player_Jump = m_Player.FindAction("Jump", throwIfNotFound: true);
m_Player_Previous = m_Player.FindAction("Previous", throwIfNotFound: true);
m_Player_Next = m_Player.FindAction("Next", throwIfNotFound: true);
m_Player_Sprint = m_Player.FindAction("Sprint", throwIfNotFound: true);
m_Player_ToggleBuild = m_Player.FindAction("ToggleBuild", throwIfNotFound: true);
m_Player_Build = m_Player.FindAction("Build", throwIfNotFound: true);
m_Player_Cancel = m_Player.FindAction("Cancel", throwIfNotFound: true);
// UI
m_UI = asset.FindActionMap("UI", throwIfNotFound: true);
m_UI_Navigate = m_UI.FindAction("Navigate", throwIfNotFound: true);
@@ -1167,10 +1165,10 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
m_UI_TrackedDeviceOrientation = m_UI.FindAction("TrackedDeviceOrientation", throwIfNotFound: true);
}
~@InputSystem_Actions()
~@PlayerInputActions()
{
UnityEngine.Debug.Assert(!m_Player.enabled, "This will cause a leak and performance issues, InputSystem_Actions.Player.Disable() has not been called.");
UnityEngine.Debug.Assert(!m_UI.enabled, "This will cause a leak and performance issues, InputSystem_Actions.UI.Disable() has not been called.");
UnityEngine.Debug.Assert(!m_Player.enabled, "This will cause a leak and performance issues, PlayerInputActions.Player.Disable() has not been called.");
UnityEngine.Debug.Assert(!m_UI.enabled, "This will cause a leak and performance issues, PlayerInputActions.UI.Disable() has not been called.");
}
/// <summary>
@@ -1248,24 +1246,26 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
private List<IPlayerActions> m_PlayerActionsCallbackInterfaces = new List<IPlayerActions>();
private readonly InputAction m_Player_Move;
private readonly InputAction m_Player_Look;
private readonly InputAction m_Player_Attack;
private readonly InputAction m_Player_Interact;
private readonly InputAction m_Player_Crouch;
private readonly InputAction m_Player_Jump;
private readonly InputAction m_Player_Previous;
private readonly InputAction m_Player_Next;
private readonly InputAction m_Player_Sprint;
private readonly InputAction m_Player_ToggleBuild;
private readonly InputAction m_Player_Build;
private readonly InputAction m_Player_Cancel;
/// <summary>
/// Provides access to input actions defined in input action map "Player".
/// </summary>
public struct PlayerActions
{
private @InputSystem_Actions m_Wrapper;
private @PlayerInputActions m_Wrapper;
/// <summary>
/// Construct a new instance of the input action map wrapper class.
/// </summary>
public PlayerActions(@InputSystem_Actions wrapper) { m_Wrapper = wrapper; }
public PlayerActions(@PlayerInputActions wrapper) { m_Wrapper = wrapper; }
/// <summary>
/// Provides access to the underlying input action "Player/Move".
/// </summary>
@@ -1275,10 +1275,6 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
/// </summary>
public InputAction @Look => m_Wrapper.m_Player_Look;
/// <summary>
/// Provides access to the underlying input action "Player/Attack".
/// </summary>
public InputAction @Attack => m_Wrapper.m_Player_Attack;
/// <summary>
/// Provides access to the underlying input action "Player/Interact".
/// </summary>
public InputAction @Interact => m_Wrapper.m_Player_Interact;
@@ -1303,6 +1299,18 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
/// </summary>
public InputAction @Sprint => m_Wrapper.m_Player_Sprint;
/// <summary>
/// Provides access to the underlying input action "Player/ToggleBuild".
/// </summary>
public InputAction @ToggleBuild => m_Wrapper.m_Player_ToggleBuild;
/// <summary>
/// Provides access to the underlying input action "Player/Build".
/// </summary>
public InputAction @Build => m_Wrapper.m_Player_Build;
/// <summary>
/// Provides access to the underlying input action "Player/Cancel".
/// </summary>
public InputAction @Cancel => m_Wrapper.m_Player_Cancel;
/// <summary>
/// Provides access to the underlying input action map instance.
/// </summary>
public InputActionMap Get() { return m_Wrapper.m_Player; }
@@ -1334,9 +1342,6 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
@Look.started += instance.OnLook;
@Look.performed += instance.OnLook;
@Look.canceled += instance.OnLook;
@Attack.started += instance.OnAttack;
@Attack.performed += instance.OnAttack;
@Attack.canceled += instance.OnAttack;
@Interact.started += instance.OnInteract;
@Interact.performed += instance.OnInteract;
@Interact.canceled += instance.OnInteract;
@@ -1355,6 +1360,15 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
@Sprint.started += instance.OnSprint;
@Sprint.performed += instance.OnSprint;
@Sprint.canceled += instance.OnSprint;
@ToggleBuild.started += instance.OnToggleBuild;
@ToggleBuild.performed += instance.OnToggleBuild;
@ToggleBuild.canceled += instance.OnToggleBuild;
@Build.started += instance.OnBuild;
@Build.performed += instance.OnBuild;
@Build.canceled += instance.OnBuild;
@Cancel.started += instance.OnCancel;
@Cancel.performed += instance.OnCancel;
@Cancel.canceled += instance.OnCancel;
}
/// <summary>
@@ -1372,9 +1386,6 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
@Look.started -= instance.OnLook;
@Look.performed -= instance.OnLook;
@Look.canceled -= instance.OnLook;
@Attack.started -= instance.OnAttack;
@Attack.performed -= instance.OnAttack;
@Attack.canceled -= instance.OnAttack;
@Interact.started -= instance.OnInteract;
@Interact.performed -= instance.OnInteract;
@Interact.canceled -= instance.OnInteract;
@@ -1393,6 +1404,15 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
@Sprint.started -= instance.OnSprint;
@Sprint.performed -= instance.OnSprint;
@Sprint.canceled -= instance.OnSprint;
@ToggleBuild.started -= instance.OnToggleBuild;
@ToggleBuild.performed -= instance.OnToggleBuild;
@ToggleBuild.canceled -= instance.OnToggleBuild;
@Build.started -= instance.OnBuild;
@Build.performed -= instance.OnBuild;
@Build.canceled -= instance.OnBuild;
@Cancel.started -= instance.OnCancel;
@Cancel.performed -= instance.OnCancel;
@Cancel.canceled -= instance.OnCancel;
}
/// <summary>
@@ -1445,12 +1465,12 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
/// </summary>
public struct UIActions
{
private @InputSystem_Actions m_Wrapper;
private @PlayerInputActions m_Wrapper;
/// <summary>
/// Construct a new instance of the input action map wrapper class.
/// </summary>
public UIActions(@InputSystem_Actions wrapper) { m_Wrapper = wrapper; }
public UIActions(@PlayerInputActions wrapper) { m_Wrapper = wrapper; }
/// <summary>
/// Provides access to the underlying input action "UI/Navigate".
/// </summary>
@@ -1708,13 +1728,6 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
void OnLook(InputAction.CallbackContext context);
/// <summary>
/// Method invoked when associated input action "Attack" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
/// </summary>
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
void OnAttack(InputAction.CallbackContext context);
/// <summary>
/// Method invoked when associated input action "Interact" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
/// </summary>
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
@@ -1756,6 +1769,27 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
void OnSprint(InputAction.CallbackContext context);
/// <summary>
/// Method invoked when associated input action "ToggleBuild" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
/// </summary>
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
void OnToggleBuild(InputAction.CallbackContext context);
/// <summary>
/// Method invoked when associated input action "Build" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
/// </summary>
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
void OnBuild(InputAction.CallbackContext context);
/// <summary>
/// Method invoked when associated input action "Cancel" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
/// </summary>
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
void OnCancel(InputAction.CallbackContext context);
}
/// <summary>
/// Interface to implement callback methods for all input action callbacks associated with input actions defined by "UI" which allows adding and removing callbacks.

View File

@@ -24,20 +24,11 @@
"interactions": "",
"initialStateCheck": true
},
{
"name": "Attack",
"type": "Button",
"id": "6c2ab1b8-8984-453a-af3d-a3c78ae1679a",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Interact",
"type": "Button",
"id": "852140f2-7766-474d-8707-702459ba45f3",
"expectedControlType": "Button",
"expectedControlType": "",
"processors": "",
"interactions": "Hold",
"initialStateCheck": false
@@ -55,7 +46,7 @@
"name": "Jump",
"type": "Button",
"id": "f1ba0d36-48eb-4cd5-b651-1c94a6531f70",
"expectedControlType": "Button",
"expectedControlType": "",
"processors": "",
"interactions": "",
"initialStateCheck": false
@@ -64,7 +55,7 @@
"name": "Previous",
"type": "Button",
"id": "2776c80d-3c14-4091-8c56-d04ced07a2b0",
"expectedControlType": "Button",
"expectedControlType": "",
"processors": "",
"interactions": "",
"initialStateCheck": false
@@ -86,6 +77,33 @@
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "ToggleBuild",
"type": "Button",
"id": "d0be6772-d106-4d28-95db-42e006045d09",
"expectedControlType": "",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Build",
"type": "Button",
"id": "4882dd65-9e5d-429b-8920-d024e1dc7f40",
"expectedControlType": "",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Cancel",
"type": "Button",
"id": "15a06032-857d-4655-9d22-c60046a9db21",
"expectedControlType": "",
"processors": "",
"interactions": "",
"initialStateCheck": false
}
],
"bindings": [
@@ -254,72 +272,6 @@
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "143bb1cd-cc10-4eca-a2f0-a3664166fe91",
"path": "<Gamepad>/buttonWest",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "05f6913d-c316-48b2-a6bb-e225f14c7960",
"path": "<Mouse>/leftButton",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "886e731e-7071-4ae4-95c0-e61739dad6fd",
"path": "<Touchscreen>/primaryTouch/tap",
"interactions": "",
"processors": "",
"groups": ";Touch",
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "ee3d0cd2-254e-47a7-a8cb-bc94d9658c54",
"path": "<Joystick>/trigger",
"interactions": "",
"processors": "",
"groups": "Joystick",
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "8255d333-5683-4943-a58a-ccb207ff1dce",
"path": "<XRController>/{PrimaryAction}",
"interactions": "",
"processors": "",
"groups": "XR",
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "b3c1c7f0-bd20-4ee7-a0f1-899b24bca6d7",
"path": "<Keyboard>/enter",
"interactions": "",
"processors": "",
"groups": "Keyboard&Mouse",
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "cbac6039-9c09-46a1-b5f2-4e5124ccb5ed",
@@ -473,6 +425,50 @@
"action": "Crouch",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "b0c31ff4-28e1-4221-8a1a-4ce414c9c8a9",
"path": "<Keyboard>/b",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "ToggleBuild",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "4a4508a3-a4bc-4f26-85d2-53b4364920c5",
"path": "<Mouse>/leftButton",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "Build",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "ea2b9aa8-a065-48f0-8de0-037adf5d260f",
"path": "<Mouse>/rightButton",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "Cancel",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "798d6431-b2de-4aad-b19c-05895bdb375b",
"path": "<Keyboard>/escape",
"interactions": "",
"processors": "",
"groups": ";Keyboard&Mouse",
"action": "Cancel",
"isComposite": false,
"isPartOfComposite": false
}
]
},

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 B

View File

@@ -0,0 +1,50 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: ConstructionSiteMaterial
m_Shader: {fileID: 4800000, guid: e260cfa7296ee7642b167f1eb5be5023, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AlphaTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: 910ae9cb0d5f6cc44befe22ac4484535, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MaskTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _EnableExternalAlpha: 0
- _ZWrite: 0
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _RendererColor: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1

View File

@@ -8,17 +8,19 @@ Material:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: GroundMaterial
m_Shader: {fileID: 4800000, guid: e260cfa7296ee7642b167f1eb5be5023, type: 3}
m_Shader: {fileID: 4800000, guid: 4e90a8289da1f3943885176e4f83e35c, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_InvalidKeywords:
- _SPECULAR_SETUP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
@@ -27,24 +29,210 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ClearCoatMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Control:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: c9946b141fc71a64c958f9fcd9e718cf, type: 3}
m_Texture: {fileID: 2800000, guid: b196776e1f0ad0e40b4d75feb0d363b7, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Mask0:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Mask1:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Mask2:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Mask3:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MaskTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Normal0:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Normal1:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Normal2:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Normal3:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Splat0:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Splat1:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Splat2:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Splat3:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TerrainHolesTexture:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BlendOp: 0
- _BumpScale: 1
- _ClearCoat: 0
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnableExternalAlpha: 0
- _ZWrite: 0
- _EnableHeightBlend: 0
- _EnableInstancedPerPixelNormal: 1
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossinessSource: 0
- _GlossyReflections: 0
- _HeightTransition: 0
- _Metallic: 0
- _Metallic0: 0
- _Metallic1: 0
- _Metallic2: 0
- _Metallic3: 0
- _Mode: 0
- _NumLayersCount: 1
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Shininess: 0
- _Smoothness: 0.5
- _Smoothness0: 0.5
- _Smoothness1: 0.5
- _Smoothness2: 0.5
- _Smoothness3: 0.5
- _SmoothnessSource: 0
- _SmoothnessTextureChannel: 0
- _SpecSource: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _UVSec: 0
- _WindQuality: 0
- _WorkflowMode: 0
- _XRMotionVectorsPass: 1
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _BaseColor: {r: 0.1001966, g: 1, b: 0, a: 1}
- _Color: {r: 0.10019658, g: 1, b: 0, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _HueVariation: {r: 1, g: 0.5, b: 0, a: 0.1}
- _RendererColor: {r: 1, g: 1, b: 1, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
- _White: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &5956188262465732407
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
version: 10

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 KiB

BIN
Assets/Materials/Tower.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 649 B

View File

@@ -0,0 +1,50 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: TowerMaterial
m_Shader: {fileID: 4800000, guid: e260cfa7296ee7642b167f1eb5be5023, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AlphaTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: b05bbd2f848b6b74cb635aff7f6aeb3a, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MaskTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _EnableExternalAlpha: 0
- _ZWrite: 0
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _RendererColor: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1

View File

@@ -0,0 +1,392 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2177408822398010026
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1178113051612323854}
- component: {fileID: 4116509313383764597}
m_Layer: 5
m_Name: BuildProgressBar
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1178113051612323854
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2177408822398010026}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2403847661259735250}
- {fileID: 7256063548841878039}
m_Father: {fileID: 1762398280990801583}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 160, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &4116509313383764597
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2177408822398010026}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 67db9e8f0e2ae9c40bc1e2b64352a6b4, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Slider
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 0}
m_FillRect: {fileID: 8303040897721361950}
m_HandleRect: {fileID: 0}
m_Direction: 0
m_MinValue: 0
m_MaxValue: 1
m_WholeNumbers: 0
m_Value: 0
m_OnValueChanged:
m_PersistentCalls:
m_Calls: []
--- !u!1 &5538244123098040924
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1762398280990801583}
- component: {fileID: 3540691141408605703}
- component: {fileID: 6741917758961255712}
- component: {fileID: 7943355422372080661}
- component: {fileID: 1314286018719963945}
m_Layer: 5
m_Name: ConstructionCanvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1762398280990801583
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5538244123098040924}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.015, y: 0.08, z: 0}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1178113051612323854}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!223 &3540691141408605703
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5538244123098040924}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 2
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 0
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!114 &6741917758961255712
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5538244123098040924}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.CanvasScaler
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 1
--- !u!114 &7943355422372080661
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5538244123098040924}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.GraphicRaycaster
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &1314286018719963945
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5538244123098040924}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4f276e01d8ad842409e5c148fb7e3e4f, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::Billboard
--- !u!1 &5849588109388851615
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2403847661259735250}
- component: {fileID: 707884888933371258}
- component: {fileID: 1356762187778846301}
m_Layer: 5
m_Name: Background
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2403847661259735250
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5849588109388851615}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1178113051612323854}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.25}
m_AnchorMax: {x: 1, y: 0.75}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &707884888933371258
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5849588109388851615}
m_CullTransparentMesh: 1
--- !u!114 &1356762187778846301
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5849588109388851615}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &7583331341754036653
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7256063548841878039}
m_Layer: 5
m_Name: Fill Area
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7256063548841878039
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7583331341754036653}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 8303040897721361950}
m_Father: {fileID: 1178113051612323854}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.25}
m_AnchorMax: {x: 1, y: 0.75}
m_AnchoredPosition: {x: -5, y: 0}
m_SizeDelta: {x: -20, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &8819001044215475393
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8303040897721361950}
- component: {fileID: 7002862170078787530}
- component: {fileID: 6563834687424854453}
m_Layer: 5
m_Name: Fill
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8303040897721361950
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8819001044215475393}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7256063548841878039}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 10, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7002862170078787530
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8819001044215475393}
m_CullTransparentMesh: 1
--- !u!114 &6563834687424854453
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8819001044215475393}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
m_Material: {fileID: 0}
m_Color: {r: 1, g: 0.6470588, b: 0, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1

View File

@@ -0,0 +1,129 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &7327242023390354019
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3298109745345281552}
- component: {fileID: 4649899659862504811}
- component: {fileID: 4610490688749176459}
- component: {fileID: 7009177059939730184}
- component: {fileID: 3261695852906763218}
m_Layer: 8
m_Name: ConstructionSite
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3298109745345281552
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7327242023390354019}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -4.90576, y: 2.5, z: -0.2079}
m_LocalScale: {x: 1, y: 5, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &4649899659862504811
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7327242023390354019}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &4610490688749176459
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7327242023390354019}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 580503b6598745244852106d95437b72, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_MaskInteraction: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!65 &7009177059939730184
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7327242023390354019}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &3261695852906763218
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7327242023390354019}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9bbda59cbb9721e419a846e7db104508, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::ConstructionSite
uiPrefab: {fileID: 5538244123098040924, guid: c3fdbbab939866e4396727cb27c57314, type: 3}
uiOffset: {x: 0, y: 2, z: 1.5}

114
Assets/Prefabs/Tower.prefab Normal file
View File

@@ -0,0 +1,114 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &7327242023390354019
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3298109745345281552}
- component: {fileID: 4649899659862504811}
- component: {fileID: 4610490688749176459}
- component: {fileID: 7009177059939730184}
m_Layer: 0
m_Name: Tower
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3298109745345281552
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7327242023390354019}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -4.90576, y: 2.5, z: -0.2079}
m_LocalScale: {x: 1, y: 5, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &4649899659862504811
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7327242023390354019}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &4610490688749176459
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7327242023390354019}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 8d6da24c0897d24498349dd41e5e9487, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_MaskInteraction: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!65 &7009177059939730184
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7327242023390354019}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -0,0 +1,17 @@
using UnityEngine;
public class Billboard : MonoBehaviour
{
private Transform _camTransform;
void Start()
{
_camTransform = Camera.main.transform;
}
void LateUpdate()
{
// UI가 항상 카메라를 정면으로 바라보게 함
transform.LookAt(transform.position + _camTransform.rotation * Vector3.forward, _camTransform.rotation * Vector3.up);
}
}

View File

@@ -0,0 +1,188 @@
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.EventSystems;
using System.Collections.Generic;
public class BuildManager : MonoBehaviour
{
public static BuildManager Instance;
[System.Serializable]
public struct TurretData // 타워별 정보를 담는 구조체
{
public string turretName;
public GameObject finalPrefab; // 완공 후 실제 타워
public GameObject ghostPrefab; // 건설 모드 시 미리보기
public float buildTime; // 건설 소요 시간
public Vector2Int size; // 점유 칸수
}
[Header("Settings")]
[SerializeField] private float cellSize = 1f;
[SerializeField] private LayerMask groundLayer;
[SerializeField] private GameObject constructionSitePrefab; // 공용 토대 프리팹
[Header("Current Selection")]
[SerializeField] private TurretData selectedTurret; // 현재 선택된 타워 데이터
[SerializeField] private bool isBuildMode = false;
private GameObject _ghostInstance;
private Material _ghostMaterial;
private HashSet<Vector2Int> _occupiedNodes = new HashSet<Vector2Int>();
private PlayerInputActions _inputActions;
void Awake()
{
Instance = this;
_inputActions = new PlayerInputActions();
}
void OnEnable()
{
_inputActions.Player.Build.performed += OnBuildPerformed;
_inputActions.Player.Cancel.performed += OnCancelPerformed;
_inputActions.Player.ToggleBuild.performed += OnTogglePerformed;
_inputActions.Enable();
}
void OnDisable()
{
_inputActions.Disable();
}
void Update()
{
if (isBuildMode)
{
UpdateGhost();
}
}
// --- Input Callbacks ---
private void OnTogglePerformed(InputAction.CallbackContext context) => ToggleBuildMode();
private void OnCancelPerformed(InputAction.CallbackContext context)
{
if (isBuildMode) ToggleBuildMode();
}
private void OnBuildPerformed(InputAction.CallbackContext context)
{
if (!isBuildMode || EventSystem.current.IsPointerOverGameObject()) return;
Vector2 mousePos = Mouse.current.position.ReadValue();
Ray ray = Camera.main.ScreenPointToRay(mousePos);
if (Physics.Raycast(ray, out RaycastHit hit, Mathf.Infinity, groundLayer))
{
Vector2Int gridPos = WorldToGrid(hit.point);
if (CanBuild(gridPos, selectedTurret.size))
{
Build(gridPos, selectedTurret);
}
}
}
// --- Core Logic ---
private void ToggleBuildMode()
{
isBuildMode = !isBuildMode;
if (isBuildMode) CreateGhost();
else DestroyGhost();
}
private void CreateGhost()
{
if (_ghostInstance != null) Destroy(_ghostInstance);
_ghostInstance = Instantiate(selectedTurret.ghostPrefab);
_ghostMaterial = _ghostInstance.GetComponentInChildren<Renderer>().material;
}
private void DestroyGhost()
{
if (_ghostInstance != null) Destroy(_ghostInstance);
}
private void UpdateGhost()
{
if (_ghostInstance == null) return;
Vector2 mousePos = Mouse.current.position.ReadValue();
Ray ray = Camera.main.ScreenPointToRay(mousePos);
if (Physics.Raycast(ray, out RaycastHit hit, Mathf.Infinity, groundLayer))
{
_ghostInstance.SetActive(true);
Vector2Int gridPos = WorldToGrid(hit.point);
_ghostInstance.transform.position = GridToWorld(gridPos, selectedTurret.size);
bool canBuild = CanBuild(gridPos, selectedTurret.size);
_ghostMaterial.color = canBuild ? new Color(0, 1, 0, 0.5f) : new Color(1, 0, 0, 0.5f);
}
else
{
_ghostInstance.SetActive(false);
}
}
private void Build(Vector2Int gridPos, TurretData data)
{
// 1. 프리팹 할당 여부 체크
if (constructionSitePrefab == null)
{
Debug.LogError("BuildManager: Construction Site Prefab이 할당되지 않았습니다!");
return;
}
if (data.finalPrefab == null)
{
Debug.LogError($"BuildManager: {data.turretName}의 Final Prefab이 할당되지 않았습니다!");
return;
}
// 2. 점유 노드 등록
for (int x = 0; x < data.size.x; x++)
for (int y = 0; y < data.size.y; y++)
_occupiedNodes.Add(new Vector2Int(gridPos.x + x, gridPos.y + y));
// 3. 토대 생성
GameObject siteObj = Instantiate(constructionSitePrefab, GridToWorld(gridPos, data.size), Quaternion.identity);
// 4. 컴포넌트 존재 여부 체크
ConstructionSite siteScript = siteObj.GetComponent<ConstructionSite>();
if (siteScript != null)
{
siteScript.Initialize(data.finalPrefab, data.buildTime);
}
else
{
Debug.LogError("BuildManager: 생성된 토대 프리팹에 ConstructionSite 스크립트가 없습니다!");
}
ToggleBuildMode();
}
// --- Utilities ---
private bool CanBuild(Vector2Int startPos, Vector2Int size)
{
for (int x = 0; x < size.x; x++)
for (int y = 0; y < size.y; y++)
if (_occupiedNodes.Contains(new Vector2Int(startPos.x + x, startPos.y + y))) return false;
return true;
}
private Vector2Int WorldToGrid(Vector3 worldPos) => new Vector2Int(Mathf.RoundToInt(worldPos.x / cellSize), Mathf.RoundToInt(worldPos.z / cellSize));
private Vector3 GridToWorld(Vector2Int gridPos, Vector2Int size)
{
return new Vector3(gridPos.x * cellSize + (size.x - 1) * cellSize * 0.5f, 0.05f, gridPos.y * cellSize + (size.y - 1) * cellSize * 0.5f);
}
private void OnDrawGizmos()
{
Gizmos.color = new Color(1, 1, 1, 0.1f);
for (int x = -10; x <= 10; x++)
for (int z = -10; z <= 10; z++)
Gizmos.DrawWireCube(new Vector3(x * cellSize, 0, z * cellSize), new Vector3(cellSize, 0.01f, cellSize));
}
}

View File

@@ -0,0 +1,55 @@
using UnityEngine;
using UnityEngine.UI; // UI 사용을 위해 추가
public class ConstructionSite : MonoBehaviour
{
[Header("UI Settings")]
[SerializeField] private GameObject uiPrefab; // 방금 만든 Canvas 프리팹
[SerializeField] private Vector3 uiOffset = new Vector3(0, 2f, 0); // 머리 위 높이
private Slider _progressSlider;
private GameObject _finalTurretPrefab;
private float _buildTime;
private float _currentProgress = 0f;
public void Initialize(GameObject finalPrefab, float time)
{
_finalTurretPrefab = finalPrefab;
_buildTime = time;
// UI 생성 및 초기화
if (uiPrefab != null)
{
GameObject uiObj = Instantiate(uiPrefab, transform.position + uiOffset, Quaternion.identity, transform);
_progressSlider = uiObj.GetComponentInChildren<Slider>();
if (_progressSlider != null)
{
_progressSlider.maxValue = 1f;
_progressSlider.value = 0f;
}
}
}
public void AdvanceConstruction(float amount)
{
_currentProgress += amount;
float ratio = _currentProgress / _buildTime;
// 슬라이더 업데이트
if (_progressSlider != null)
{
_progressSlider.value = ratio;
}
if (_currentProgress >= _buildTime)
{
CompleteBuild();
}
}
private void CompleteBuild()
{
Instantiate(_finalTurretPrefab, transform.position, transform.rotation);
Destroy(gameObject);
}
}

View File

@@ -0,0 +1,58 @@
using UnityEngine;
using UnityEngine.InputSystem;
public class PlayerBuildInteract : MonoBehaviour
{
[Header("Interaction Settings")]
[SerializeField] private float interactRange = 3f; // 건설 가능 거리
[SerializeField] private float buildSpeedMultiplier = 1f; // 건설 속도 배율
[SerializeField] private LayerMask constructionLayer; // 토대 레이어 (선택 사항)
private PlayerInputActions _inputActions;
private bool _isInteracting = false;
void Awake()
{
_inputActions = new PlayerInputActions();
// Interact 액션 연결 (Hold 방식)
_inputActions.Player.Interact.started += ctx => _isInteracting = true;
_inputActions.Player.Interact.canceled += ctx => _isInteracting = false;
}
void OnEnable() => _inputActions.Enable();
void OnDisable() => _inputActions.Disable();
void Update()
{
// 키를 누르고 있을 때만 실행
if (_isInteracting)
{
PerformConstruction();
}
}
void PerformConstruction()
{
// 주변의 모든 콜라이더 검사
Collider[] targets = Physics.OverlapSphere(transform.position, interactRange, constructionLayer);
foreach (var col in targets)
{
// 토대 컴포넌트가 있는지 확인
ConstructionSite site = col.GetComponent<ConstructionSite>();
if (site != null)
{
// 드디어 여기서 호출합니다!
site.AdvanceConstruction(Time.deltaTime * buildSpeedMultiplier);
}
}
}
// 에디터에서 상호작용 범위를 확인하기 위함
void OnDrawGizmosSelected()
{
Gizmos.color = Color.yellow;
Gizmos.DrawWireSphere(transform.position, interactRange);
}
}

View File

@@ -1,36 +0,0 @@
using UnityEngine;
using UnityEngine.InputSystem; // New Input System 사용
public class PlayerMovement : MonoBehaviour
{
private Rigidbody _rb;
private Vector2 _inputVector;
[SerializeField] private float moveSpeed = 5f;
void Awake()
{
_rb = GetComponent<Rigidbody>();
}
// Player Input 컴포넌트의 Behavior가 'Send Messages'일 때 자동 호출됨
// Input Action 이름이 "Move"라면 "OnMove"라는 메서드를 찾습니다.
void OnMove(InputValue value)
{
_inputVector = value.Get<Vector2>();
}
void FixedUpdate()
{
// 물리 연산은 프레임 독립적인 FixedUpdate에서 수행
Move();
}
void Move()
{
Vector3 movement = new Vector3(_inputVector.x, 0, _inputVector.y) * moveSpeed;
// Rigidbody의 속도를 직접 제어하거나 MovePosition 사용
// 등속도 이동을 위해 velocity의 x, z만 변경 (y는 중력 유지를 위해 기존 값 사용)
_rb.linearVelocity = new Vector3(movement.x, _rb.linearVelocity.y, movement.z);
}
}

View File

@@ -0,0 +1,36 @@
using UnityEngine;
using UnityEngine.InputSystem;
public class PlayerMovement : MonoBehaviour
{
[SerializeField] private float moveSpeed = 5f;
private Vector2 _moveInput;
private CharacterController _controller;
private PlayerInputActions _inputActions;
void Awake()
{
_controller = GetComponent<CharacterController>();
_inputActions = new PlayerInputActions();
// Move 액션 연결 (Vector2 타입으로 설정되어 있어야 함)
_inputActions.Player.Move.performed += ctx => _moveInput = ctx.ReadValue<Vector2>();
_inputActions.Player.Move.canceled += ctx => _moveInput = Vector2.zero;
}
void OnEnable() => _inputActions.Enable();
void OnDisable() => _inputActions.Disable();
void Update()
{
// 입력받은 방향으로 이동 계산
Vector3 move = new Vector3(_moveInput.x, 0, _moveInput.y);
_controller.Move(move * Time.deltaTime * moveSpeed);
// 이동 중일 때 바라보는 방향 전환 (선택 사항)
if (move != Vector3.zero)
{
transform.forward = move;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 KiB

View File

@@ -0,0 +1,11 @@
{
"asset": "c179f86efc9ecef499be9cb95262e4f9",
"fileName": "019bb115-c46d-72e1-bbe6-957167ee77a3_Preview.png",
"prompt": "ground",
"negativePrompt": "",
"model": "44ec3749-963a-44b1-aa54-dc19f6ed8ab2",
"modelName": "Unity Texture2D",
"customSeed": 1964709878,
"w3CTraceId": "55a4d6a7c178e3f36138e30ab6152dea",
"refinementMode": "Generation"
}

View File

@@ -0,0 +1,228 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: GroundMaterial
m_Shader: {fileID: 4800000, guid: 69c1f799e772cb6438f56c23efccb782, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses:
- MOTIONVECTORS
- DepthOnly
- SHADOWCASTER
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AlphaTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Control:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Mask0:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Mask1:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Mask2:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Mask3:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MaskTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Normal0:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Normal1:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Normal2:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Normal3:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Splat0:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Splat1:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Splat2:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Splat3:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TerrainHolesTexture:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 10
- _EnableExternalAlpha: 0
- _EnableHeightBlend: 0
- _EnableInstancedPerPixelNormal: 1
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _HeightTransition: 0
- _Metallic: 0
- _Metallic0: 0
- _Metallic1: 0
- _Metallic2: 0
- _Metallic3: 0
- _Mode: 0
- _NumLayersCount: 1
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _Smoothness0: 0.5
- _Smoothness1: 0.5
- _Smoothness2: 0.5
- _Smoothness3: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 1
- _UVSec: 0
- _WindQuality: 0
- _WorkflowMode: 1
- _XRMotionVectorsPass: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.1001966, g: 1, b: 0, a: 1}
- _Color: {r: 0.10019658, g: 1, b: 0, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _HueVariation: {r: 1, g: 0.5, b: 0, a: 0.1}
- _RendererColor: {r: 1, g: 1, b: 1, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &5956188262465732407
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
version: 10

View File

@@ -0,0 +1,11 @@
{
"asset": "c179f86efc9ecef499be9cb95262e4f9",
"fileName": "GroundMaterial.mat",
"prompt": "",
"negativePrompt": "",
"model": "",
"modelName": "",
"customSeed": -1,
"w3CTraceId": "",
"refinementMode": "Generation"
}

View File

@@ -14,8 +14,8 @@ TagManager:
- Water
- UI
- Enemy
-
-
- Ground
- ConstructionZone
-
-
-