![]() Every task is different so I think I should create few override methods with same name but different parameter depending on the derived class but I don't know how to implement it as the compiler will not accept it: RunTask(quizItems) can't convert from QuizItem to derived class item. Data types The client and server can pass data to each other via Remote Actions, State Synchronization or via Network Messages Mirror supports a number of data types you can use with these, including: Basic C types (byte, int, char, uint, UInt64, float, string, etc.) Built-in Unity math type (Vector3, Quaternion, Rect, Plane, Vector3Int, etc. ![]() In QuizManager script I created QuizTask array to hold all tasks and easily switch to the next one. OpenTask:QuizTask and OneOfFourTask:QuizTask and so on. But how is that different to any other type of script Normally, when you create a Monobehaviour script, it’s attached to a game object as a component running in your scene. Scriptable Objects can run functions like a regular class, but have the additional ability to save data after leaving play mode. Scriptable Objects are a type of class in Unity that can be used to create multiple instances of a script that each contain their own unique values. Using Scriptable Objects in your project is a great way to save file size and makes for some user friendly game design. ![]() There will be different kind of tasks so I made base class QuizTask: ScriptableObject. What youre having Unity to do is store an instance of a running GameEventListener into the serializable field of a ScriptableObject, which is an asset on disk. Scriptable Objects are highly performant data containers that are specific to Unity. I want to make a quiz game in Unity C# by using ScriptableObjects. ![]() Can you guide me on how it can be done (or if there is another way)? ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |