© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
3 replies
yoobgieboobgie

❔ Hi need help with code for arrays in unity

i have to code a simple game for school where 3 different items r dropped randomly across a plane and the player is supposed to collect them. depending on which item you collect there should be a ui feedback with a button to use said item
we did this with scriptable objects and 3 seperate prefabs that r being instantiated randomly
now how do i acess these collected items and how do i use them
the items r collected in a list when collected how do i acces a specific index of that list? for now i can only use the item with index 0
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Help with Code in Unity
C#CC# / help
3y ago
Help with Arrays in my code?
C#CC# / help
2y ago
Hi I Need Help In Two Dimensional Arrays
C#CC# / help
2y ago