Пример #1
0
        public static BuildRAtlasSO CreateWallSectionAtlasAsset(string name = null, string directory = null)
        {
            BuildRAtlasSO buildRAtlas = CreateInstance <BuildRAtlasSO>();

            if (Application.isPlaying)
            {
                return(buildRAtlas);
            }
            if (name != null)
            {
                buildRAtlas.name = name;
            }
#if UNITY_EDITOR
            if (directory == null)
            {
                UnityEditor.AssetDatabase.CreateAsset(buildRAtlas, AssetCreator.GeneratePath("buildrAtlas.asset", "BuildRAtlases"));
            }
            else
            {
                UnityEditor.AssetDatabase.CreateAsset(buildRAtlas, Path.Combine(directory, "buildrAtlas.asset"));
            }
#endif

            return(buildRAtlas);
        }
Пример #2
0
        private static BuildRAtlasSO MenuCreateAtlas()
        {
            BuildRAtlasSO output = CreateWallSectionAtlasAsset();

            UnityEditor.Selection.activeObject = output;
            return(output);
        }
Пример #3
0
        private static BuildRAtlasSO MenuCreateAtlasB()
        {
            string        activeFolder = AssetCreator.ActiveSelectionPath();
            BuildRAtlasSO output       = CreateWallSectionAtlasAsset(null, activeFolder);

            UnityEditor.Selection.activeObject = output;
            return(output);
        }
Пример #4
0
 private void OnEnable()
 {
     _wallSection = (BuildRAtlasSO)target;
 }