This file contains hidden or 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
| using System.Collections; | |
| using System.Collections.Generic; | |
| using Junaid.Utilities; | |
| using Sirenix.OdinInspector; | |
| using UnityEngine; | |
| namespace BL.Managers | |
| { | |
| public class GameManager : Singleton<GameManager> | |
| { |
This file contains hidden or 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
| using System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| using Sirenix.OdinInspector; | |
| namespace Junaid.Utilities | |
| { | |
| // This class derived was from https://gamedev.stackexchange.com/a/151547 | |
| public abstract class Singleton<T> : MonoBehaviour where T : MonoBehaviour |
This file contains hidden or 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
| // Found At https://answers.unity.com/questions/633474/how-to-remove-options-from-the-external-tools-exte.html | |
| using UnityEditor; | |
| using UnityEngine; | |
| public class EditorResetPrefs : MonoBehaviour | |
| { | |
| [MenuItem ("Edit/Reset Preferences")] | |
| static void ResetPrefs() | |
| { |
This file contains hidden or 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
| // From the Sirenix discord channel | |
| [OnInspectorGUI] | |
| private void DrawAreaThing() | |
| { | |
| Rect rect = EditorGUILayout(false, 500); // Allocate an area in the GUILayout system. | |
| SirenixEditorGUI.DrawBorders(rect, 1); | |
| if (Event.current.type == EventType.MouseDown && Event.current.button == 0 && rect.Contains(Event.currrent.mousePosition)) |
This file contains hidden or 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
| using UnityEngine; | |
| using System.Collections; | |
| using UnityStandardAssets.CrossPlatformInput; | |
| public class CameraController : MonoBehaviour | |
| { | |
| public GameObject target; | |
| public float panSpeed = 50.0f; | |
| public bool simpleVerticalRotate = true; |