public virtual void OnEnable() { ConcaveShape = target as FSConcaveShapeComponent; EditTarget = new SerializedObject(ConcaveShape); FSSettings.Load(); categorySettings = FSSettings.CategorySettings; }
private void SwitchSettings(FSSettingsPlatform platform) { GUI.FocusWindow(-1); FSSettings.CoreSettings = loadedFSCoreSettings; FSSettings.Save(); FSSettings.Load(platform); loadedFSCoreSettings = FSSettings.CoreSettings; switchs = false; }
private void OnDestroy() { Save(); // write and recompile string settings_f = ""; settings_f += fpe_settings_header; settings_f += "#if UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX \n\n"; FSSettings.Load(FSSettingsPlatform.Desktop); settings_f += FormattedSettings(); settings_f += "\n#elif UNITY_WEBPLAYER\n\n"; FSSettings.Load(FSSettingsPlatform.Web); settings_f += FormattedSettings(); settings_f += "\n#elif UNITY_IPHONE\n\n"; FSSettings.Load(FSSettingsPlatform.iOS); settings_f += FormattedSettings(); settings_f += "\n#elif UNITY_ANDROID\n\n"; FSSettings.Load(FSSettingsPlatform.Android); settings_f += FormattedSettings(); settings_f += "\n#else\n\n"; FSSettings.Load(FSSettingsPlatform.Default); settings_f += FormattedSettings(); settings_f += "\n#endif\n\n"; settings_f += fpe_settings_footer; string path = Application.dataPath + "/FarseerUnity/Base/FarseerPhysics"; FileStream fs; StreamWriter sw0; fs = File.Open(path + "/Settings.cs", FileMode.Truncate); sw0 = new StreamWriter(fs); sw0.Write(settings_f); sw0.Flush(); sw0.Close(); AssetDatabase.Refresh(ImportAssetOptions.ForceUpdate); }
protected virtual void Awake() { target0 = target as FSCollisionGroup; FSSettings.Load(); categorySettings = FSSettings.CategorySettings; }
public void Setup() { FSSettings.Load(); loadedFSCategorySettings = FSSettings.CategorySettings; }
public virtual void OnEnable() { target0 = target as FSShapeComponent; FSSettings.Load(); categorySettings = FSSettings.CategorySettings; }