Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    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.