Exemple #1
0
 /// <summary>
 /// Init
 /// </summary>
 private void Start()
 {
     if (_instance == null || _instance == this)
     {
         _instance = this;
     }
     else
     {
         Debug.LogWarning("Only one instance should exist!");
         Destroy(this);
     }
 }
Exemple #2
0
        /// <summary>
        /// Loads the open flight file when a loading slot is available.
        /// </summary>
        /// <param name='file'>The openflight file to load.</param>
        /// <param name='callback'>Callback when the file has finished loading into the scene. Can be null.</param>
        /// <param name='settings'>Custom import settings for this file.</param>
        public static void LoadOpenFlight(string file, Action <Database> callback, ImportSettings settings)
        {
            OpenFlightLoader l = Instance;

            LoadRequest lr = new LoadRequest();

            lr.path     = file;
            lr.callback = callback;
            lr.settings = settings;

            l._Queue.Enqueue(lr);
            l.UpdateLoaders();
        }