public virtual void UpdateGenerator() { // BrushMeshes of generators must always be unique if (!brushContainerAsset || !ChiselBrushContainerAssetManager.IsBrushMeshUnique(brushContainerAsset)) { brushContainerAsset = ChiselBrushContainerAsset.Create("Generated " + NodeTypeName); } UpdateGeneratorInternal(); UpdateBrushMeshInstances(); }
public virtual void UpdateGenerator() { // BrushMeshes of generators must always be unique if (!brushContainerAsset || !ChiselBrushContainerAssetManager.IsBrushMeshUnique(brushContainerAsset)) { brushContainerAsset = UnityEngine.ScriptableObject.CreateInstance <ChiselBrushContainerAsset>(); brushContainerAsset.name = "Generated " + NodeTypeName; } UpdateGeneratorInternal(); UpdateBrushMeshInstances(); }
public virtual void UpdateGenerator() { // BrushMeshes of generators must always be unique Profiler.BeginSample("ChiselBrushContainerAsset.Create"); try { if (!brushContainerAsset || !ChiselBrushContainerAssetManager.IsBrushMeshUnique(brushContainerAsset)) { brushContainerAsset = ChiselBrushContainerAsset.Create("Generated " + NodeTypeName); } } finally { Profiler.EndSample(); } Profiler.BeginSample("UpdateGeneratorInternal"); try { UpdateGeneratorInternal(); } finally { Profiler.EndSample(); } brushContainerAsset.SetDirty(); Profiler.BeginSample("UpdateBrushMeshInstances"); try { UpdateBrushMeshInstances(); } finally { Profiler.EndSample(); } }