public MapSettings(eMapDepthDimession depthDimession, string textureSavePathRelativeToProject, string mapDataSavePathRelativeToProject) { this.mapDepthDimession = depthDimession; this.textureSavePathRelativeToProject = textureSavePathRelativeToProject; this.mapDataSavePathRelativeToProject = mapDataSavePathRelativeToProject; }
public void InitWithExistProfiler() { if (ms != null) { textureSavePathRelativeToProject = ms.textureSavePathRelativeToProject; mapDataSavePathRelativeToProject = ms.mapDataSavePathRelativeToProject; eDepthDimess = ms.mapDepthDimession; } }
public static float GetDepth(this Vector3 v, eMapDepthDimession dimess) { if (dimess == eMapDepthDimession.DepthY) { return(v.y); } else { return(v.z); } }
public static Vector3 SetHeight(this Vector3 v, eMapDepthDimession dimess, float val) { if (dimess == eMapDepthDimession.DepthY) { v.Set(v.x, v.y, val); } else { v.Set(v.x, val, v.z); } return(v); }
void OnGUI() { eDepthDimess = (eMapDepthDimession)EditorGUILayout.EnumPopup("Depth dimession", eDepthDimess); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("map texture save path:"); textureSavePathRelativeToProject = EditorGUILayout.TextField(textureSavePathRelativeToProject); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("map data save path:"); mapDataSavePathRelativeToProject = EditorGUILayout.TextField(mapDataSavePathRelativeToProject); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); if (GUILayout.Button("Apply")) { try { if (Validate()) { Generate(); } this.Close(); } catch (System.Exception e) { error = e.Message; } } if (GUILayout.Button("Cancel")) { this.Close(); } EditorGUILayout.EndHorizontal(); GUILayout.Label(error, errorStyle); }