Call a public class (p1) with (p + this.name + .Name) (this.name = 1 or 2 or 3...)
Hey Guys
I have a little Problem.
As you can see on the pictures I have a class for each Pokemon Named p1, p2, p3... Now I want to acces for example "p14.Name". How can I do this? this.name is the Pokedexnumber (1 or 2 or 3... up to 147).
screenshot-10.png
(22.0 kB)
screenshot-11.png
(9.1 kB)
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612105136im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
I cant access a script that I made in Assets/Scripts from the FirstPersonCharacter script. 1 Answer
Can not access an abstract class from another script! 0 Answers
How to make objects without the new keyword 0 Answers
storing multiple data types in a list 0 Answers
How to call a method from a class in a different script in c# 1 Answer