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

get instance id?

Discussion in 'Scripting' started by melonhead, Apr 17, 2020.

  1. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    603
    can anyone help with this, i have multiple instances of a prefab but need to check a value on one of the instances using debug.log, can this be done using the getinstanceid() command to only show the value from the one specific instance

    thanks
     
  2. SpartianTheDev

    SpartianTheDev

    Joined:
    Jan 17, 2019
    Posts:
    11
    Is it necessary to get instance id?
    I mean you can create a script and give it to all that instances and put a variable called "id"