Created
February 10, 2019 22:35
-
-
Save MartinGonzalez/cf2fd259a020e639252f91b0f7385925 to your computer and use it in GitHub Desktop.
ScriptableObject04
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 UnityEngine; | |
public class ScriptableObjectDemo : MonoBehaviour | |
{ | |
private const string ApplicationSettingsPath = "ApplicationSettings/ApplicationSettings"; | |
void Start () | |
{ | |
var applicationSettings = | |
Resources.Load<ScriptableApplicationSettings>(ApplicationSettingsPath); | |
Debug.Log(applicationSettings.MyString); | |
Debug.Log(applicationSettings.MyInt); | |
Debug.Log(applicationSettings.MyFloat); | |
Debug.Log(applicationSettings.MyGameObject); | |
Debug.Log(applicationSettings.MyList); | |
Debug.Log(applicationSettings.MyStruct); | |
Debug.Log(applicationSettings.MyCustomClass); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment