We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ebb5577 commit 667ea92Copy full SHA for 667ea92
Runtime/Core/DisplayObject.cs
@@ -303,7 +303,11 @@ public bool visible
303
304
if (parent != null && _visible)
305
{
306
- gameObject.SetActive(true);
+ if (gameObject.activeSelf == false)
307
+ {
308
+ gameObject.SetActive(true);
309
+ }
310
+
311
InvalidateBatchingState();
312
if (this is Container)
313
@@ -312,7 +316,10 @@ public bool visible
316
}
317
else
314
318
315
- gameObject.SetActive(false);
319
+ if (gameObject.activeSelf)
320
321
+ gameObject.SetActive(false);
322
323
324
325
0 commit comments