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 UnityEditor; | |
| using UnityEngine; | |
| namespace EditorScripts | |
| { | |
| public abstract class SerializedEditorWindow : EditorWindow | |
| { | |
| /// <summary> | |
| /// Serialization target, can be overridden to allow target to be something other than this editor window | |
| /// </summary> |
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
| namespace JamesFrowen | |
| { | |
| public interface ISomeInterface | |
| { | |
| void SomeMethod(); | |
| } | |
| [System.Serializable] | |
| public class SomeInterfaceWrapper : InterfaceWrapper<ISomeInterface> | |
| { |
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
| /* | |
| GameObject A would have PlayerControler and SetPlayerReference. | |
| GameObject B would have WantsToUsePlayer. | |
| SetPlayerReference and WantsToUsePlayer have same PlayerReference set via the inspector. | |
| WantsToUsePlayer will be able to use PlayerReference to have reference to PlayerControler. Even if GameObject A is spawned from a prefab after the game starts. | |
| */ |
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 UnityEngine; | |
| public interface IMonoBehaviour | |
| { | |
| // Object | |
| string name { get; } | |
| // Component |
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 UnityEngine; | |
| public class FixedDistanceMove : MonoBehaviour | |
| { | |
| private bool moving = false; | |
| public void StartMove(Vector3 target, float travelTime) | |
| { |
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; | |
| namespace JamesFrowen.Variables | |
| { | |
| public abstract class SingletonScriptableObject<T> : ScriptableObject where T : ScriptableObject | |
| { | |
| protected static T _instance; | |
| public static T Instance | |
| { | |
| get |
NewerOlder