Airship Scriptable Objects
// This will show in Create -> ScriptableObjects -> Example Data Object by default
@CreateAssetMenu()
export default class ExampleDataObject extends AirshipScriptableObject {
public message = "Hello, world!";
protected Awake() {
// This will be fired when the scriptable object is first referenced/created.
// The properties of this object will be set up on Awake
print(this.message, "from the example scriptable object awake!");
}
protected OnDestroy() {
// This will be called if:
// - A CreateInstance() ScriptableObject is destroyed
print("This object was destroyed!");
}
}Referencing a ScriptableObject in your game

CreateAssetMenu on it, it will show up here by default.




Last updated