Created
February 26, 2020 08:59
-
-
Save Frank-Buss/821bf30960f5f8456859150791d9bdba to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class NewBehaviourScript : MonoBehaviour | |
{ | |
public void test(int ID) | |
{ | |
System.Type types = { | |
typeof(Integer), | |
typeof(Long), | |
typeof(String)}; | |
System.Type type = default; | |
if (ID >= 0 && ID < types.length) { | |
type = types[ID]; | |
} | |
// do something with type | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment