Skip to content

Instantly share code, notes, and snippets.

@MartinGonzalez
Created February 10, 2019 22:35
Show Gist options
  • Save MartinGonzalez/cf2fd259a020e639252f91b0f7385925 to your computer and use it in GitHub Desktop.
Save MartinGonzalez/cf2fd259a020e639252f91b0f7385925 to your computer and use it in GitHub Desktop.
ScriptableObject04
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