KS.Reactor.ksScriptAsset Class Reference

Base class for scripts that can be loaded from assets. More...

Inheritance diagram for KS.Reactor.ksScriptAsset:
KS.Reactor.Server.ksPhysicsMaterial KS.Reactor.ksCollisionFilter KS.Reactor.ksPlayerController

Public Member Functions

virtual ksScriptAsset Clone ()
 Creates a copy of the script with the value of all members tagged with ksEditable or ksCloneable copied. More...
 

Properties

static ksBaseAssetLoader Assets [get, set]
 Asset loader singleton. Set this to supply a custom asset loader. More...
 
uint AssetId [get, set]
 The id of the asset. Zero means it is not an asset. More...
 
string AssetPath [get, set]
 The asset path. More...
 
bool IsPrefab [get, set]
 Is this a prefab asset? If true, this is the asset returned by ksBaseAssetLoader.Get<T>(uint, bool). More...
 
string? AssetName [get]
 The name of the asset. More...
 

Detailed Description

Base class for scripts that can be loaded from assets.

Member Function Documentation

◆ Clone()

virtual ksScriptAsset KS.Reactor.ksScriptAsset.Clone ( )
virtual

Creates a copy of the script with the value of all members tagged with ksEditable or ksCloneable copied.

Arrays, lists, and dictionaries are cloned. Other object references will reference the same object.

Reimplemented in KS.Reactor.ksPlayerController.

Property Documentation

◆ AssetId

uint KS.Reactor.ksScriptAsset.AssetId
getset

The id of the asset. Zero means it is not an asset.

◆ AssetName

string? KS.Reactor.ksScriptAsset.AssetName
get

The name of the asset.

This is the part of the AssetPath after the last '/'.

◆ AssetPath

string KS.Reactor.ksScriptAsset.AssetPath
getset

The asset path.

◆ Assets

ksBaseAssetLoader KS.Reactor.ksScriptAsset.Assets
staticgetset

Asset loader singleton. Set this to supply a custom asset loader.

◆ IsPrefab

bool KS.Reactor.ksScriptAsset.IsPrefab
getset

Is this a prefab asset? If true, this is the asset returned by ksBaseAssetLoader.Get<T>(uint, bool).