Monday, December 5, 2022
HomeGame DevelopmentUnity C# Syntax for Assorted DataType Array?

Unity C# Syntax for Assorted DataType Array?


I’ve completed making the prototype for my maze maker in Java. All that is left is to translate my Java Code into Unity C#. Nevertheless, I’ve reached what seems to be an insurmountable hurdle:
In my Java Code, I’ve new Object[] {boolean, String} in my Java code. In Java, an Object kinna features virtually like a “wild card” datatype. It may be something. I am searching for the closest equal in Unity C#. I’ve tried utilizing Object[] {bool, string and Listing<Object> myList = new Listing<Object>(); myList.Add(bool); myList.Add(String);.

Neither of these options appears to be appropriate with what precisely it’s I am making an attempt to attain. What I would like is a kind of “wild card” datatype the place I can create a strongly typed 2-element array in order that I can’t add or take away components however I can change them to no matter.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments