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. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

Random game object reshuffling.

Discussion in 'Scripting' started by Awesomevk47, Dec 30, 2017.

  1. Awesomevk47

    Awesomevk47

    Joined:
    Dec 25, 2017
    Posts:
    32
    Ok....thanks....:)
     
  2. Awesomevk47

    Awesomevk47

    Joined:
    Dec 25, 2017
    Posts:
    32
    I am just a newbie....i am still under process of learning...and ya my school subject is biology....soo its a bit tough for me.....to figure out stuffs....on top of that unity has a bit of variations like "GameObject"..."vector3".... (ive never used or heard of it before.
     
  3. Awesomevk47

    Awesomevk47

    Joined:
    Dec 25, 2017
    Posts:
    32
    Ya the basic concept is same...but still a bit confusing specially if you have joined 5 days ago
     
  4. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,712
    I can't disagree, as this topic/thread has grown here.

    It would be good to try learning the basics. Try doing introduction to unity interface & essentials. Introduction to scripting C# in Unity. Follow a few simple tutorials. No sense getting too lost on 3 cubes randomly changing positions for a few days, if you will be completely lost on the next bit of code that you try to tackle.

    I'll still be here to help finish up / see how this bit goes, personally, but I think the above advice is sound for you & you will get a lot more out of it that way, than just coming here to ask for an answer you can't really understand.
     
  5. Awesomevk47

    Awesomevk47

    Joined:
    Dec 25, 2017
    Posts:
    32
    Ok you are true here ......
    It was my mistake......actually i have very less time...coping with acadamics (physics,chemistry,bio) is tough....it was my mistake and curiosty for unity ....that made me in haste...i confess my mistake.
     
  6. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,712
    It's no problem to be curious about Unity lol. That's how I started, too :)
    You'll get much more fulfillment out of it if you learn from the ground up, is all I was saying (and @hippocoder meant, I'm pretty sure).

    Nothing wrong with asking questions, either.. :)

    Just the right mix.. Plus, if you're busy with school, that's a whole separate issue =)
     
  7. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Yeah it's no problem, just challenging to learn C# - we can't do it for you.
     
  8. Awesomevk47

    Awesomevk47

    Joined:
    Dec 25, 2017
    Posts:
    32
    Ok...appreciated....surely ill learn c#
     
  9. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,378
    A little late to respond but...

    Either that one line had to be commented out, otherwise entries would get dropped from the array, and others would get doubled/tripled/etc up... or you have to swap them.

    I didn't read to in depth into what the OP wanted. The code implies it wanted to randomly swap the positions. And that one line on its own implied he wanted to swap the indexes. So I just finished out the swapping indexes as well.
     
  10. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,712
    Ya, I later realized after writing that (I think) that it wasn't commented out , though he said it was my version of the code (which did have it commented out) lol. So, I kinda pieced it together..

    Thanks for answering, though :)
     
  11. AliasInteractive

    AliasInteractive

    Joined:
    Jun 29, 2019
    Posts:
    2
    How would I call this from a coroutine inside another script? i.e. shuffle now.

    cheers