-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
30a70bb
commit 2ccfa61
Showing
40 changed files
with
1,766 additions
and
1,432 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#if(UNITY_EDITOR) | ||
using UnityEditor; | ||
using UnityEngine; | ||
using UnityEngine.UIElements; | ||
using UnityEditor.UIElements; | ||
|
||
[CustomPropertyDrawer(typeof(CubeVector))] | ||
public class BiomeDrawer : PropertyDrawer { | ||
public override void OnGUI( | ||
Rect position, | ||
SerializedProperty property, | ||
GUIContent label | ||
) { | ||
Biome biome = new Biome( | ||
(Terrains)property.FindPropertyRelative("Terrain").intValue, | ||
property.FindPropertyRelative("plant").intValue | ||
); | ||
|
||
position = EditorGUI.PrefixLabel(position, label); | ||
GUI.Label(position, biome.ToString()); | ||
} | ||
} | ||
#endif |
2 changes: 1 addition & 1 deletion
2
...csharp/Runtime/Enums/TerrainTypes.cs.meta → ...en-unitycsharp/Editor/BiomeDrawer.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#if (UNITY_EDITOR) | ||
using UnityEditor; | ||
using UnityEngine; | ||
using UnityEngine.UIElements; | ||
using UnityEditor.UIElements; | ||
|
||
[CustomPropertyDrawer(typeof(ClimateData))] | ||
public class ClimateDataDrawer : PropertyDrawer { | ||
public override void OnGUI( | ||
Rect position, | ||
SerializedProperty property, | ||
GUIContent label | ||
) { | ||
ClimateData cubeVector = new ClimateData( | ||
property.FindPropertyRelative("clouds").floatValue, | ||
property.FindPropertyRelative("moisture").floatValue, | ||
property.FindPropertyRelative("temperature").floatValue | ||
); | ||
|
||
position = EditorGUI.PrefixLabel(position, label); | ||
GUI.Label(position, cubeVector.ToString()); | ||
} | ||
} | ||
#endif |
2 changes: 1 addition & 1 deletion
2
...sharp/Editor/HexCoordinatesDrawer.cs.meta → ...tycsharp/Editor/ClimateDataDrawer.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#if (UNITY_EDITOR) | ||
using UnityEditor; | ||
using UnityEngine; | ||
using UnityEngine.UIElements; | ||
using UnityEditor.UIElements; | ||
|
||
[CustomPropertyDrawer(typeof(CubeVector))] | ||
public class CubeVectorDrawer : PropertyDrawer { | ||
public override void OnGUI( | ||
Rect position, | ||
SerializedProperty property, | ||
GUIContent label | ||
) { | ||
CubeVector cubeVector = new CubeVector( | ||
property.FindPropertyRelative("_x").intValue, | ||
property.FindPropertyRelative("_z").intValue | ||
); | ||
|
||
position = EditorGUI.PrefixLabel(position, label); | ||
GUI.Label(position, cubeVector.ToString()); | ||
} | ||
} | ||
#endif |
2 changes: 1 addition & 1 deletion
2
...itycsharp/Runtime/Core/HexClimate.cs.meta → ...itycsharp/Editor/CubeVectorDrawer.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.