Skip to content

Instantly share code, notes, and snippets.

@ZeredaGames
Last active February 27, 2019 10:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZeredaGames/6306bc5f6bd0310212301ec42eaf9eca to your computer and use it in GitHub Desktop.
Save ZeredaGames/6306bc5f6bd0310212301ec42eaf9eca to your computer and use it in GitHub Desktop.
Next Step in tutorial
#region using
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
//using UnityEngine.UI;
//using UnityEngine.SceneManagement;
//using System;
//using System.Collections;
//using System.Collections.Generic;
#endregion
#region Script
namespace ZeredaGamesEngine.Core.MusicListsExamples.Example2
{
#region Attributes
//[RequireComponent (typeof())]
//[System.Serializable]
#endregion
public class EditorWindowTutorial : EditorWindow
{
#region Variables
///<summary> Sets Defaults in update.</summary>
public static bool setDefaults;
public bool DebugMode;
#endregion
#region Unity Methods
///<summary> Awake is called when the script instance is being loaded.</summary>
void Awake()
{
DebugMode = GetDebugMode;
}
///<summary> Start is called just before any of the Update methods is called the first time.</summary>
void Start()
{
}
///<summary> Update is called every frame, if the MonoBehaviour is enabled.</summary>
void Update()
{
}
#endregion
#region ZeredaGames Methods
///<summary> Can be used for starting this instance.</summary>
[MenuItem("Window/ZeredaGamesTutorials/EditorWindowTutorial")]
public static void StaticInitialize()
{
EditorWindowTutorial window = (EditorWindowTutorial)EditorWindow.GetWindow(typeof(EditorWindowTutorial));
}
public void Init()
{
StaticInitialize();
//Start writting here
}
public bool GetDebugMode
{
get
{
string message = PlayerPrefs.GetString("DebugMode");
if (message == "true")
{
DebugMode = true;
return DebugMode;
}
else {
DebugMode = false;
return DebugMode;
}
}
}
#endregion
}
}
#endregion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment