Ejemplo n.º 1
0
        public override void OnInspectorGUI()
        {
            //Load a Texture (Assets/Resources/Textures/texture01.png)
            var mainTexture = Resources.Load <Texture2D>("ManagerLogo");

            GUILayout.BeginHorizontal();
            GUILayout.Label(mainTexture);
            GUILayout.EndHorizontal();

            WanderManager animalManager = (WanderManager)target;

            if (!Application.isPlaying)
            {
                base.OnInspectorGUI();
                return;
            }

            GUILayout.Space(10);

            animalManager.PeaceTime = EditorGUILayout.Toggle("Peace Time", animalManager.PeaceTime);

            GUILayout.Space(5);

            if (GUILayout.Button("Kill 'Em All"))
            {
                animalManager.Nuke();
            }
        }
Ejemplo n.º 2
0
        public override void OnInspectorGUI()
        {
            //Load a Texture (Assets/Resources/Textures/texture01.png)
            var mainTexture = Resources.Load <Texture2D>("ManagerLogo");

            GUILayout.BeginHorizontal();
            if (GUILayout.Button(mainTexture))
            {
                Application.OpenURL("https://assetstore.unity.com/?q=Polyperfect&orderBy=0");
            }
            GUILayout.EndHorizontal();

            WanderManager Manager = (WanderManager)target;

            if (!Application.isPlaying)
            {
                base.OnInspectorGUI();
                return;
            }

            GUILayout.Space(10);

            Manager.PeaceTime = EditorGUILayout.Toggle("Peace Time", Manager.PeaceTime);

            GUILayout.Space(5);

            if (GUILayout.Button("Kill 'Em All"))
            {
                Manager.Nuke();
            }
        }