Commit 66842814 authored by 18손재민's avatar 18손재민

바닥 큐브 찍기 wip

parent 1f975a2a
......@@ -33,7 +33,7 @@ RectTransform:
- {fileID: 1444571408998523810}
- {fileID: 1444571409017468568}
m_Father: {fileID: 1444571407667829093}
m_RootOrder: 2
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
......@@ -173,6 +173,7 @@ RectTransform:
m_Children:
- {fileID: 1444571407947569430}
- {fileID: 1444571408874085631}
- {fileID: 8481677237166896314}
- {fileID: 1444571407224148019}
- {fileID: 1444571408487427164}
m_Father: {fileID: 1444571408780882984}
......@@ -563,7 +564,7 @@ RectTransform:
- {fileID: 1444571409082407055}
- {fileID: 1444571409048073019}
m_Father: {fileID: 1444571407667829093}
m_RootOrder: 3
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
......@@ -1147,3 +1148,202 @@ MonoBehaviour:
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: y
--- !u!1 &4627057188426517374
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8481677237166896314}
- component: {fileID: 1208357495010514080}
- component: {fileID: 102112414454582912}
- component: {fileID: 1828251375556061743}
m_Layer: 5
m_Name: baker
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8481677237166896314
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4627057188426517374}
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_Children:
- {fileID: 6537887167247173335}
m_Father: {fileID: 1444571407667829093}
m_RootOrder: 2
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: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1208357495010514080
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4627057188426517374}
m_CullTransparentMesh: 0
--- !u!114 &102112414454582912
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4627057188426517374}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
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
--- !u!114 &1828251375556061743
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4627057188426517374}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
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_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_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 102112414454582912}
m_OnClick:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!1 &6893738648555008701
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6537887167247173335}
- component: {fileID: 5558418791589363251}
- component: {fileID: 8277514317556363032}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6537887167247173335
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6893738648555008701}
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_Children: []
m_Father: {fileID: 8481677237166896314}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5558418791589363251
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6893738648555008701}
m_CullTransparentMesh: 0
--- !u!114 &8277514317556363032
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6893738648555008701}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 'Bake
'
......@@ -529,6 +529,191 @@ PrefabInstance:
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 1908494592}
- target: {fileID: 1444571407667829093, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1444571407947569430, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1444571407947569430, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1444571407947569430, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1444571407947569430, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1444571407947569430, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 116
objectReference: {fileID: 0}
- target: {fileID: 1444571407947569430, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -117
objectReference: {fileID: 0}
- target: {fileID: 1444571408874085631, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1444571408874085631, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1444571408874085631, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1444571408874085631, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1444571408874085631, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 116
objectReference: {fileID: 0}
- target: {fileID: 1444571408874085631, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -157
objectReference: {fileID: 0}
- target: {fileID: 1444571407224148019, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1444571407224148019, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1444571407224148019, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1444571407224148019, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1444571407224148019, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 120
objectReference: {fileID: 0}
- target: {fileID: 1444571407224148019, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -44
objectReference: {fileID: 0}
- target: {fileID: 1444571408487427164, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1444571408487427164, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1444571408487427164, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1444571408487427164, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1444571408487427164, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 122
objectReference: {fileID: 0}
- target: {fileID: 1444571408487427164, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -81
objectReference: {fileID: 0}
- target: {fileID: 8481677237166896314, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 115
objectReference: {fileID: 0}
- target: {fileID: 8481677237166896314, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -196
objectReference: {fileID: 0}
- target: {fileID: 8481677237166896314, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8481677237166896314, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8481677237166896314, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8481677237166896314, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1828251375556061743, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1828251375556061743, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1828251375556061743, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
value: 2
objectReference: {fileID: 0}
- target: {fileID: 1828251375556061743, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 1908494592}
- target: {fileID: 1828251375556061743, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: Rebaker
objectReference: {fileID: 0}
- target: {fileID: 1828251375556061743, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 0b18400fb62a12d4e9cb5fbb8ecbb53f, type: 3}
--- !u!1001 &6014610517247297951
......@@ -543,6 +728,26 @@ PrefabInstance:
propertyPath: m_Name
value: MapManager
objectReference: {fileID: 0}
- target: {fileID: 6014610519130626207, guid: 11285456de5f1854d947bea83275646f,
type: 3}
propertyPath: player
value:
objectReference: {fileID: 170803409}
- target: {fileID: 6014610519130626207, guid: 11285456de5f1854d947bea83275646f,
type: 3}
propertyPath: surface
value:
objectReference: {fileID: 2102809461}
- target: {fileID: 6014610519130626207, guid: 11285456de5f1854d947bea83275646f,
type: 3}
propertyPath: xInput
value:
objectReference: {fileID: 32149022}
- target: {fileID: 6014610519130626207, guid: 11285456de5f1854d947bea83275646f,
type: 3}
propertyPath: yInput
value:
objectReference: {fileID: 1513534067}
- target: {fileID: 6014610519130626206, guid: 11285456de5f1854d947bea83275646f,
type: 3}
propertyPath: m_LocalPosition.x
......@@ -598,26 +803,6 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6014610519130626207, guid: 11285456de5f1854d947bea83275646f,
type: 3}
propertyPath: player
value:
objectReference: {fileID: 170803409}
- target: {fileID: 6014610519130626207, guid: 11285456de5f1854d947bea83275646f,
type: 3}
propertyPath: surface
value:
objectReference: {fileID: 2102809461}
- target: {fileID: 6014610519130626207, guid: 11285456de5f1854d947bea83275646f,
type: 3}
propertyPath: xInput
value:
objectReference: {fileID: 32149022}
- target: {fileID: 6014610519130626207, guid: 11285456de5f1854d947bea83275646f,
type: 3}
propertyPath: yInput
value:
objectReference: {fileID: 1513534067}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 11285456de5f1854d947bea83275646f, type: 3}
--- !u!1001 &7277015660625800392
......
......@@ -13,9 +13,11 @@ public class MapManager : MonoBehaviour
public GameObject[,] mapGrid;
public NavMeshSurface surface;
public InputField xInput, yInput;
public void Rebaker()
{
surface.BuildNavMesh();
}
public void RemoveTile()
{
if (mapGrid[int.Parse(xInput.text), int.Parse(yInput.text)] != null)
......@@ -37,8 +39,6 @@ public class MapManager : MonoBehaviour
Debug.Log("Tile already exists");
}
// Start is called before the first frame update
void Start()
{
......@@ -47,6 +47,8 @@ public class MapManager : MonoBehaviour
for(int j = 0; j < y; j++)
mapGrid[i, j] = Instantiate(floor, new Vector3(i, 0, j), Quaternion.identity, transform);
Instantiate(wall, new Vector3(2, 1, 2), Quaternion.identity, transform);
Instantiate(wall, new Vector3(3, 1, 2), Quaternion.identity, transform);
Instantiate(wall, new Vector3(3, 1, 3), Quaternion.identity, transform);
surface.BuildNavMesh();
player.transform.position = mapGrid[0, 0].transform.position + new Vector3(0, 1.5f, 0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment