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. Dismiss Notice

tRouBLe wITh ObJeCt in array, c#

Discussion in 'Scripting' started by DarmMan, Oct 14, 2014.

  1. DarmMan

    DarmMan

    Joined:
    Oct 27, 2013
    Posts:
    1
    Hi, I have an array of object (script component) and I just want to move one object from position array[i,j] to another, for example arrray[i+2,j+2] and delete object in array[i,j]. Should I use indicators? C# may have problem with indicators. help
     
  2. Pirs01

    Pirs01

    Joined:
    Sep 30, 2012
    Posts:
    389
    What are indicators?

    Just assign the reference to new element in array and then assign null to old element.
     
    Jymmy097 likes this.
  3. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,738
    aLso, dOnt evEr tYpE yOur tItlE liKe thiS.

    Like seriously, cut that out.
     
  4. nysh

    nysh

    Joined:
    Oct 15, 2014
    Posts:
    11
    all signs of a troll post lol
     
  5. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    Guess we need to help 12 year olds who want to look cool, though? Might also be the kid has a dodgy keyboard?