Skip to content

Commit

Permalink
feat: Automatically generated objects are no longer editable (NotEdit…
Browse files Browse the repository at this point in the history
…able).

The automatically generated objects (UIParticleRenderer, UIParticleOverlayCamera) are not editable and will not be saved in scenes or prefabs.
  • Loading branch information
mob-sakai committed Dec 23, 2023
1 parent 4e4b9eb commit 5607dc4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Scripts/UIParticle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ private Camera GetBakeCamera()
// Create ortho-camera.
if (!_orthoCamera)
{
var go = new GameObject("[generated] UIParticleOverlayCamera") { hideFlags = HideFlags.DontSave };
var go = new GameObject("[generated] UIParticleOverlayCamera") { hideFlags = HideFlags.DontSave | HideFlags.NotEditable };
go.SetActive(false);
go.transform.SetParent(transform, false);
_orthoCamera = go.AddComponent<Camera>();
Expand Down
2 changes: 1 addition & 1 deletion Scripts/UIParticleRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public static UIParticleRenderer AddRenderer(UIParticle parent, int index)
// Create renderer object.
var go = new GameObject("[generated] UIParticleRenderer", typeof(UIParticleRenderer))
{
hideFlags = HideFlags.DontSave,
hideFlags = HideFlags.DontSave | HideFlags.NotEditable,
layer = parent.gameObject.layer
};

Expand Down

0 comments on commit 5607dc4

Please sign in to comment.