Skip to content

Commit 541a78a

Browse files
committed
ASCII FBX exporter added and camera jump on first time orbit fixed
1 parent 7a453dd commit 541a78a

38 files changed

+16002
-463
lines changed

.idea/.idea.Voksel/.idea/contentModel.xml

Lines changed: 20 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.Voksel/.idea/indexLayout.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.Voksel/.idea/workspace.xml

Lines changed: 59 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/red.mat renamed to Assets/Base.mat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Material:
77
m_CorrespondingSourceObject: {fileID: 0}
88
m_PrefabInstance: {fileID: 0}
99
m_PrefabAsset: {fileID: 0}
10-
m_Name: red
10+
m_Name: Base
1111
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
1212
m_ShaderKeywords:
1313
m_LightmapFlags: 4
@@ -73,5 +73,5 @@ Material:
7373
- _UVSec: 0
7474
- _ZWrite: 1
7575
m_Colors:
76-
- _Color: {r: 0.8773585, g: 0.120016046, b: 0.120016046, a: 1}
76+
- _Color: {r: 0.116767526, g: 0.292129, b: 0.6037736, a: 1}
7777
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

Assets/Base.mat.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Cube.prefab

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ GameObject:
1313
- component: {fileID: 6798081440881224543}
1414
- component: {fileID: 6798081440881224542}
1515
- component: {fileID: 898581808174137867}
16+
- component: {fileID: 748663017}
1617
m_Layer: 0
1718
m_Name: Cube
1819
m_TagString: Untagged
@@ -106,3 +107,22 @@ MonoBehaviour:
106107
m_Script: {fileID: 11500000, guid: 5b0b23ed835172f4082c9a82ab0107b9, type: 3}
107108
m_Name:
108109
m_EditorClassIdentifier:
110+
canDelete: 1
111+
--- !u!114 &748663017
112+
MonoBehaviour:
113+
m_ObjectHideFlags: 0
114+
m_CorrespondingSourceObject: {fileID: 0}
115+
m_PrefabInstance: {fileID: 0}
116+
m_PrefabAsset: {fileID: 0}
117+
m_GameObject: {fileID: 6798081440881224537}
118+
m_Enabled: 1
119+
m_EditorHideFlags: 0
120+
m_Script: {fileID: 11500000, guid: 5fea29bb7c508c244a1f805a5fd3fc4d, type: 3}
121+
m_Name:
122+
m_EditorClassIdentifier:
123+
outlineMode: 1
124+
outlineColor: {r: 0, g: 0, b: 0, a: 1}
125+
outlineWidth: 2
126+
precomputeOutline: 0
127+
bakeKeys: []
128+
bakeValues: []

Assets/Editor/MeshCombineWizard.cs

Lines changed: 0 additions & 123 deletions
This file was deleted.

Assets/PlaceCube.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
using System.Collections;
22
using System.Collections.Generic;
33
using UnityEngine;
4+
using UnityEngine.EventSystems;
45

56
public class PlaceCube : MonoBehaviour
67
{
78
private Camera mainCamera;
9+
public Transform parent;
810
public GameObject cube;
911
public float gridSize;
1012
Vector3 wordPos;
@@ -20,6 +22,8 @@ void Update()
2022
Vector3 mousePos=new Vector3(Input.mousePosition.x, Input.mousePosition.y, 0f);
2123

2224
if(Input.GetMouseButtonDown(0)) {
25+
if(EventSystem.current.IsPointerOverGameObject())
26+
return;
2327
Ray ray=mainCamera.ScreenPointToRay(mousePos);
2428
RaycastHit hit;
2529
if(Physics.Raycast(ray,out hit,1000f)) {
@@ -31,7 +35,8 @@ void Update()
3135
wordPos.y = Mathf.Round((wordPos.y / gridSize) *gridSize);
3236
wordPos.z = Mathf.Round((wordPos.z / gridSize) *gridSize);
3337
Debug.Log(wordPos);
34-
Instantiate(cube,wordPos,Quaternion.identity);
38+
GameObject go = Instantiate(cube,wordPos,Quaternion.identity);
39+
go.transform.SetParent(parent);
3540
}
3641

3742
}

0 commit comments

Comments
 (0)