示例#1
0
 static public void SaveAssetAdvisory(this UnityEngine.Object item)
 {
     if (Application.isPlaying == false)
     {
         PlayEditDistinction <SaveAssetEditDistinctionAttribute>
         .ExecuteNoReturnEditDistinction <UnityEngine.Object>(item);
     }
 }
示例#2
0
        static public T SpawnInstance <T>(this T item) where T : UnityEngine.Object
        {
            if (Application.isPlaying)
            {
                return(UnityEngine.Object.Instantiate <T>(item));
            }

            return((T)PlayEditDistinction <SpawnInstanceEditDistinctionAttribute>
                   .ExecuteEditDistinction <UnityEngine.Object, UnityEngine.Object>(item));
        }
示例#3
0
 static public Texture2D Sideload(this Texture2D item)
 {
     return(PlayEditDistinction <SideloadEditDistinctionAttribute> .Execute(t => t, item));
 }
示例#4
0
 static public int GetContentIdentity(this UnityEngine.Object item)
 {
     return(PlayEditDistinction <GetContentIdentityEditDistinctionAttribute>
            .Execute(i => i.GetHashCodeEX(), item));
 }