You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicstaticreadonlyGUIContentallowInstancing=EditorGUIUtility.TrTextContent("Allow Instancing","When enabled, the effect will try to be batched with other of the same type.");
1509
+
publicstaticreadonlyGUIContentreleaseInstanceOnDisable=EditorGUIUtility.TrTextContent("Release Instance On Disable","When enabled, the effect instance will be created when the component is enabled, and released when it is disabled, to optimize memory usage.");
1506
1510
1507
1511
publicstaticreadonlyGUIContentgraphInBundle=EditorGUIUtility.TrTextContent("Exposed properties are hidden in the Inspector when Visual Effect Assets are stored in Asset Bundles.");
1508
1512
publicstaticreadonlyGUIContentplay=newGUIContent("Send Play Event");
yieldreturnRelease_Batch_Instance_When_Disabled_CompareInstanceCount("Disable keeps instances by default",vfxAsset,initialInstanceCount);
609
+
610
+
vfxComponent.releaseInstanceWhenDisabled=true;
611
+
yieldreturnRelease_Batch_Instance_When_Disabled_CompareInstanceCount("Setting releaseInstanceWhenDisabled releases instance if already disabled",vfxAsset,initialInstanceCount-1);
612
+
613
+
vfxComponent.enabled=true;
614
+
yieldreturnRelease_Batch_Instance_When_Disabled_CompareInstanceCount("Enabling the component again recreates the instance",vfxAsset,initialInstanceCount);
615
+
616
+
vfxComponent.enabled=false;
617
+
yieldreturnRelease_Batch_Instance_When_Disabled_CompareInstanceCount("Disabling the component with releaseInstanceWhenDisabled releases the instance",vfxAsset,initialInstanceCount-1);
618
+
619
+
vfxComponent.releaseInstanceWhenDisabled=false;
620
+
yieldreturnRelease_Batch_Instance_When_Disabled_CompareInstanceCount("Clearing releaseInstanceWhenDisabled when disabled recreates the instance",vfxAsset,initialInstanceCount);
0 commit comments