For ScriptableObject workflow.
Go to file
2022-05-07 01:39:35 +02:00
Documentation~ Initial commit 2021-12-22 11:55:51 +01:00
Editor Update ExtendedScriptableObjectDrawer.cs 2022-05-07 01:33:01 +02:00
Runtime NonSerialized fields 2022-01-02 17:11:40 +01:00
Samples~ Scriptable Data & Events 2021-12-22 12:53:49 +01:00
.gitignore Initial commit 2021-12-22 11:55:51 +01:00
CHANGELOG.md Update package 2022-05-07 01:39:35 +02:00
CHANGELOG.md.meta Scriptable Data & Events 2021-12-22 12:53:49 +01:00
Editor.meta ExpandableScriptableObjectDrawer 2021-12-23 04:02:01 +01:00
LICENSE.md Scriptable Data & Events 2021-12-22 12:53:49 +01:00
LICENSE.md.meta Scriptable Data & Events 2021-12-22 12:53:49 +01:00
package.json Update package 2022-05-07 01:39:35 +02:00
package.json.meta Scriptable Data & Events 2021-12-22 12:53:49 +01:00
README.md ExpandableScriptableObjectDrawer 2021-12-23 04:02:01 +01:00
README.md.meta Scriptable Data & Events 2021-12-22 12:53:49 +01:00
Runtime.meta Scriptable Data & Events 2021-12-22 12:53:49 +01:00
THIRD PARTY NOTICES.md ExpandableScriptableObjectDrawer 2021-12-23 04:02:01 +01:00
THIRD PARTY NOTICES.md.meta Scriptable Data & Events 2021-12-22 12:53:49 +01:00

ScriptableData

Data

ScriptableData stores runtime data to be accessed by scripts that reference the ScriptableObject. It has a OnValueChangedEvent to subscribe when data changes. With this workflow you can remove dependencies and increase flexibility.

Extendable Data:

public class ScriptableData<T0> : ScriptableObject {}
public class ScriptableData<T0, T1> : ScriptableObject {}
public class ScriptableData<T0, T1, T2> : ScriptableObject {}
public class ScriptableData<T0, T1, T2, T3> : ScriptableObject {}

Example:

[CreateAssetMenu(menuName = "ScriptableData/Data/Vector3", order = 147)]
public class SDVector3 : ScriptableData<Vector3> {}

Events

ScriptableEvent does not contain any runtime data but can be used to send events (with data) around.

Base Event

[CreateAssetMenu(menuName = "ScriptableData/Event/Event", order = 147)]
public class ScriptableEvent : ScriptableObject {}

Extendable Events:

public class ScriptableEvent<T0> : ScriptableObject {}
public class ScriptableEvent<T0, T1> : ScriptableObject {}
public class ScriptableEvent<T0, T1, T2> : ScriptableObject {}
public class ScriptableEvent<T0, T1, T2, T3> : ScriptableObject {}

Example:

[CreateAssetMenu(menuName = "ScriptableData/Event/Vector3", order = 147)]
public class SEVector3 : ScriptableEvent<Vector3> {}

ExtendedScriptableObjectDrawer

If you don't want to use the extended drawer, use the [NonExpandable] attribute.

Example:

[NonExpandable]
public SEVector3 myVector3;

Install

Installing from a Git URL

Unitypackage

LICENSE

Overall package is licensed under MIT, unless otherwise noted in the 3rd party licenses file and/or source code.