This file contains 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 |
This file contains 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 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 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 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 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.IO; | |
using Mirror; | |
using UnityEngine; | |
namespace ScreenShotDemo | |
{ | |
public class SendImage : MonoBehaviour | |
{ |
This file contains 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.Generic; | |
using System.ComponentModel; | |
using System.Net; | |
using System.Net.Sockets; | |
using Telepathy; | |
using UnityEngine; | |
using UnityEngine.Serialization; | |
namespace Mirror |
This file contains 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
public abstract class AssetSet : ScriptableObject { } | |
public abstract class AssetSet<T> : AssetSet where T : Object | |
{ | |
[SerializeField] protected List<T> _items = new List<T>(); | |
private Dictionary<string, T> _dictionary; | |
public string TypeName => typeof(T).Name; | |
public const string CAN_NOT_FIND_WARNING = "{0} could not find {1}"; |
This file contains 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.IO; | |
using UnityEditor; | |
using UnityEngine; | |
namespace JamesFrowen.EditorScripts | |
{ | |
public static class SpriteMaker | |
{ | |
[MenuItem("Tools/Sprite Maker/Make Circle 256x256")] | |
public static void MakeCircle() |
This file contains 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.Linq; | |
using Mirror; | |
using UnityEngine; | |
namespace JamesFrowen.MirrorExamples | |
{ | |
/// <summary> | |
/// Sync NetworkBehviours in chuld objects | |
/// </summary> |
OlderNewer