This file contains 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; | |
using System.Collections; | |
[ExecuteInEditMode] | |
public class SOExampleBehaviour : MonoBehaviour | |
{ | |
public SOExample test; | |
public void OnEnable() | |
{ | |
// find existing instance if needed | |
if (test == null) |
This file contains 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
.... | |
--- !u!114 &819407913 <<--- this is our ScriptableObject id in the scene | |
MonoBehaviour: | |
m_ObjectHideFlags: 0 | |
m_PrefabParentObject: {fileID: 0} | |
m_PrefabInternal: {fileID: 0} | |
m_GameObject: {fileID: 0} | |
m_Enabled: 1 | |
m_EditorHideFlags: 0 | |
m_Script: {fileID: 11500000, guid: 4a48e9db79a952f419ca79d71a03fe31, type: 3} |
This file contains 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; | |
using System.Collections; | |
public class SOExampleBehaviour : MonoBehaviour | |
{ | |
public SOExample test; | |
public void OnEnable() | |
{ | |
// instantiate if needed | |
if (test == null) | |
test = ScriptableObject.CreateInstance<SOExample>(); |
This file contains 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; | |
using System.Collections; | |
public class SOExample : ScriptableObject | |
{ | |
public string text; | |
} |
NewerOlder