Class SubAssetsScriptableObject
Base class for Scriptable Object that holds a list of Assets (for instnce, Meshes) and controls their Saving within Asset file (if present) and controls their Destroying from Asset file (if saved)
Implements
Inherited Members
ScriptableObject.SetDirty()
ScriptableObject.CreateInstance<T>()
Object.GetInstanceID()
Object.GetHashCode()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Scene)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.Instantiate(Object, Transform)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DontDestroyOnLoad(Object)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindObjectOfType<T>()
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Object.ToString()
Object.name
Object.hideFlags
Namespace: Fwt.Core
Assembly: fwt.core.dll
Syntax
public abstract class SubAssetsScriptableObject : ScriptableObject, ISubAssetsContainer
Fields
IsSaveAssetsSeparately
Declaration
[Tooltip("If true, assets will be saved one by one to separate files in folder with name of this ScriptableAsset next to it in file system")]
public bool IsSaveAssetsSeparately
Field Value
| Type | Description |
|---|---|
| bool |
MeshAssetFileExtension
Declaration
[Tooltip("Meshes are saved to file with this extension (asset, obj, etc)")]
public string MeshAssetFileExtension
Field Value
| Type | Description |
|---|---|
| string |
Properties
SubAssets
Declaration
public List<Object> SubAssets { get; }
Property Value
| Type | Description |
|---|---|
| List<Object> |
Methods
DeleteSubAsset(Object)
Removes provided asset from file of the current Scriptable Object. Removes provided asset from cache. DOES NOT DESTROY asset OBJECT! Only removes it from file and cache.
Declaration
public virtual void DeleteSubAsset(Object asset)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | asset |
DestroyAllSubAssets()
Declaration
[ContextMenu("Destroy All Sub Assets")]
public virtual void DestroyAllSubAssets()
DestroySubAsset(Object)
Removes Asset from file and DESTROYS it
Declaration
public virtual void DestroySubAsset(Object asset)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | asset |
OnEnable()
Declaration
protected virtual void OnEnable()
ReloadSubAssets()
Declaration
[ContextMenu("Reload Sub Assets")]
public virtual void ReloadSubAssets()
SaveSubAsset(Object)
Adds provided asset to file of the current Scriptable Object. Adds provided asset to cache.
Declaration
public virtual void SaveSubAsset(Object asset)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | asset |