示例#1
0
        public static void RegenerateSimID()
        {
            SimID = Guid.NewGuid().ToString();
            ClientSettingsService csservice = new ClientSettingsService();

            csservice.SetSimID(SimID);
        }
示例#2
0
        private static void Initialize()
        {
            Root = Path.Combine(Application.dataPath, "..");
            PersistentDataPath = Application.persistentDataPath;

            ParseConfigFile();
            if (!Application.isEditor)
            {
                ParseCommandLine();
                CreateLockFile();
            }

            AssetBundle.UnloadAllAssetBundles(false);
            Sensors       = new List <SensorConfig>();
            SensorPrefabs = new List <SensorBase>();

            BridgePlugins.Load();
            LoadBuiltinAssets();
            LoadExternalAssets();
            Sensors = SensorTypes.ListSensorFields(SensorPrefabs);

            DatabaseManager.Init();

            ClientSettingsService csservice = new ClientSettingsService();

            if (string.IsNullOrEmpty(SimID))
            {
                SimID = csservice.GetOrMake().simid;
            }

            csservice.SetSimID(SimID);
        }
示例#3
0
        private static void Initialize()
        {
            Root = Path.Combine(Application.dataPath, "..");
            PersistentDataPath = Application.persistentDataPath;

            ParseConfigFile();
            if (!Application.isEditor)
            {
                ParseCommandLine();
                CreateLockFile();
            }

            AssetBundle.UnloadAllAssetBundles(false);
            Sensors       = new List <SensorConfig>();
            SensorPrefabs = new List <SensorBase>();
            if (SensorPrefabs.Any(s => s == null))
            {
                Debug.LogError("!!! Null Sensor Prefab Detected - Check RuntimeSettings SensorPrefabs List for missing Sensor Prefab");
#if UNITY_EDITOR
                UnityEditor.EditorApplication.isPlaying = false;
#else
                Application.Quit(1); // return non-zero exit code
#endif
            }

            BridgePlugins.Load();
            LoadBuiltinAssets();
            LoadExternalAssets();
            Sensors = SensorTypes.ListSensorFields(SensorPrefabs);

            DatabaseManager.Init();

            ClientSettingsService csservice = new ClientSettingsService();
            if (string.IsNullOrEmpty(SimID))
            {
                SimID = csservice.GetOrMake().simid;
            }

            csservice.SetSimID(SimID);
        }