Exemple #1
0
        public MapLoader(TiledToUnityLinker linker, MapLoaderOptions options = MapLoaderOptions.NONE)
        {
            if(linker == null) Debug.LogError("The linker provided is null");
            this.linker = linker;

            this.options = options;
        }
Exemple #2
0
        void createNewLinker()
        {
            TiledToUnityLinker newLinker = (TiledToUnityLinker)ScriptableObject.CreateInstance("TiledToUnityLinker");
            string             path      = findNameForNewLinker();

            AssetDatabase.CreateAsset(newLinker, path);
        }
 void loadNewLinker()
 {
     TiledToUnityLinker loadedLinker = (TiledToUnityLinker)AssetDatabase.LoadAssetAtPath(linkerPath, typeof(TiledToUnityLinker));
     if(loadedLinker != null){
         linker = loadedLinker;
     }else{
         Debug.LogError("Selected file not a Linker!");
     }
 }
Exemple #4
0
        public MapLoader(TiledToUnityLinker linker, MapLoaderOptions options = MapLoaderOptions.NONE)
        {
            if (linker == null)
            {
                Debug.LogError("The linker provided is null");
            }
            this.linker = linker;

            this.options = options;
        }
        public GameObject loadFile(TiledToUnityLinker linker, FileInfo file)
        {
            MapLoader mapLoader = new MapLoader(linker,options);
            GameObject mapLoaded = mapLoader.loadFromFile(file);

            if(loadToPrefab){
                makeGameObjectAsPrefab(mapLoaded, mapLoaded.name);
            }
            return mapLoaded;
        }
Exemple #6
0
        public GameObject loadFile(TiledToUnityLinker linker, FileInfo file)
        {
            MapLoader  mapLoader = new MapLoader(linker, options);
            GameObject mapLoaded = mapLoader.loadFromFile(file);

            if (loadToPrefab)
            {
                makeGameObjectAsPrefab(mapLoaded, mapLoaded.name);
            }
            return(mapLoaded);
        }
Exemple #7
0
        void loadNewLinker()
        {
            TiledToUnityLinker loadedLinker = (TiledToUnityLinker)AssetDatabase.LoadAssetAtPath(linkerPath, typeof(TiledToUnityLinker));

            if (loadedLinker != null)
            {
                linker = loadedLinker;
            }
            else
            {
                Debug.LogError("Selected file not a Linker!");
            }
        }
Exemple #8
0
 public TilesetLoader(TiledToUnityLinker linker)
 {
     this.linker = linker;
 }
 public TilesetLoader(TiledToUnityLinker linker)
 {
     this.linker = linker;
 }