dark wood
This commit is contained in:
30
Assets/Scripts/Editor/FogZoneEditor.cs
Normal file
30
Assets/Scripts/Editor/FogZoneEditor.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
#if UNITY_EDITOR
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
// --- TEN KOD ZNAJDUJE SIĘ W PLIKU O NAZWIE FogZoneEditor.cs ---
|
||||
// --- MUSI ON ZNAJDOWAĆ SIĘ W FOLDERZE O NAZWIE "Editor" ---
|
||||
|
||||
[CustomEditor(typeof(FogZone))]
|
||||
public class FogZoneEditor : Editor
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
DrawDefaultInspector();
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
FogZone zone = (FogZone)target;
|
||||
if (GUILayout.Button("Przywróć Ustawienia Domyślne", GUILayout.Height(30)))
|
||||
{
|
||||
if (EditorUtility.DisplayDialog("Przywróć Domyślne",
|
||||
"Czy na pewno chcesz przywrócić globalne ustawienia mgły (RenderSettings) do wartości zdefiniowanych w tym skrypcie?",
|
||||
"Tak, przywróć", "Anuluj"))
|
||||
{
|
||||
zone.RestoreDefinedDefaults();
|
||||
Debug.Log("Globalne ustawienia mgły zostały przywrócone do domyślnych.", zone.gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
2
Assets/Scripts/Editor/FogZoneEditor.cs.meta
Normal file
2
Assets/Scripts/Editor/FogZoneEditor.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0bee297921336aa48928de9f6e207a63
|
||||
Reference in New Issue
Block a user