I am not asking for any code.
What I’m looking for is advice on how to do a right clicking system like runescapes. The only ways I can think of how to do this, is make a script for every clickable object in the game, but that would be a HUGE waste of space. Obviously this is not how I should do it.
The thing is, when you right click nothing / the ground, it should say nothing and only with a close button, but when you right click lets say a store keeper, there should be options like Talk, Store, Quest, Close. How can I make a system that detects what options the clicked object has, then puts it into an array? If any expert at Unity code could explain how this could be achieved, I would be incredibly grateful. Such a small thing is just being a huge problem for me to solve without wasting space. Thank you!