Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

***Enable Components On Inactive Objects HELP!!!!***

Discussion in 'Scripting' started by RealAspireGames, Jul 4, 2015.

  1. RealAspireGames

    RealAspireGames

    Joined:
    Dec 24, 2013
    Posts:
    265
    Hello,
    I am trying to network a game and am having some issues with enabling components on inactive gameobjects.
    Is there a way to find the component and enable it even though it's object is inactive?

    Any support would be greatly appreciated

    Thanks! :)
     
  2. booiljoung

    booiljoung

    Joined:
    May 12, 2013
    Posts:
    57
    Nobody can enable component of inactive game object.

    A way to find component of inactive game object.
    Component[] comp = Resources.FindObjectsOfTypeAll<Component>();
    This method very expensive.
     
    RealAspireGames likes this.