Exemple #1
0
 public MapLoader(MapLinker linker)
 {
     if (linker == null)
     {
         Debug.LogError("The linker provided is null");
     }
     this.linker = linker;
 }
Exemple #2
0
        public void loadFile(MapLinker linker, FileInfo file)
        {
            MapLoader  mapLoader = new MapLoader(linker);
            GameObject mapLoaded = mapLoader.loadFromFile(file);

            if (loadToPrefab)
            {
                makeGameObjectAsPrefab(mapLoaded, mapLoaded.name);
            }
        }
Exemple #3
0
        void loadNewLinker()
        {
            MapLinker loadedLinker = (MapLinker)AssetDatabase.LoadAssetAtPath("Assets" + linkerPath, typeof(MapLinker));

            if (loadedLinker != null)
            {
                linker = loadedLinker;
            }
            else
            {
                Debug.LogError("Selected file not a Linker!");
            }
        }
Exemple #4
0
        void createNewLinker()
        {
            MapLinker newLinker = (MapLinker)ScriptableObject.CreateInstance("MapLinker");

            AssetDatabase.CreateAsset(newLinker, "Assets/linker.asset");
        }
Exemple #5
0
 public TilesetLoader(MapLinker linker)
 {
     this.linker = linker;
 }