protected override VisualElement CreateSettingsView() { var sv = base.CreateSettingsView(); settingsView.RegisterChangedCallback(() => { // Reflect the changes on the graph output texture but not on the asset to avoid stalls. graph.UpdateOutputTexture(false); }); return(sv); }
public static void ToggleMode(MixtureGraph mixture) { mixture.isRealtime = !mixture.isRealtime; AssetDatabase.SaveAssets(); mixture.UpdateOutputTexture(true); AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(mixture), ImportAssetOptions.ForceUpdate | ImportAssetOptions.ImportRecursive | ImportAssetOptions.DontDownloadFromCacheServer); AssetDatabase.Refresh(); MixtureGraphWindow.Open(mixture); }