Editor.Assets.JavaScriptAsset
ClassA script asset that is written in JavaScript.
Index
Properties
Methods
Example
#script-assetshttps://docs.snap.com/lens-studio/5.0.0/essential-skills/scripting/scripting-introduction
Extends
Properties
attachments
attachments:
Asset[]
Array of assets attached to this script.
Inherited from
cacheFile
readonlycacheFile:Path
Path to the cached asset file.
Inherited from
componentId
readonlycomponentId:Uuid
Id associated with the script asset.
Inherited from
declarationFile
declarationFile:
ScriptAsset
TypeScript declaration file path for this script's type definitions.
Inherited from
description
description:
string
Description associated with the script asset
Inherited from
exportId
readonlyexportId:Uuid
Export id associated with the script asset.
Inherited from
fileMeta
readonlyfileMeta:AssetImportMetadata
Import metadata for the asset.
Inherited from
icon
icon:
Icon
Icon associated with the script asset.
Inherited from
id
readonlyid:Uuid
The unique id of the entity.
Inherited from
meta
readonlymeta:Meta
Metadata associated with this entity, providing access to its unique identifier and other descriptive properties.
Inherited from
name
readonlyname:string
The name of the asset.
Inherited from
readMe
readMe:
MarkdownAsset
Documentation string for this script.
Inherited from
scriptInputInfo
readonlyscriptInputInfo:any
Read-only information about the script's input parameters.
scriptType
scriptType:
ScriptType
The kind of script this asset defines. See Editor.Assets.ScriptType.
Inherited from
tags
tags:
string[]
Array of tags categorizing this script.
Inherited from
type
readonlytype:string
The entity's type.
Inherited from
version
version:
Version
Version associated with the script asset.
Inherited from
Methods
getDirectlyReferencedEntities()
getDirectlyReferencedEntities():
Entity[]
A list of entities which this entity has a reference to.
Returns
Entity[]
Inherited from
ScriptAsset.getDirectlyReferencedEntities
getMeta()
staticgetMeta():Meta
Returns metadata about this type.
Returns
Overrides
getOwnedEntities()
getOwnedEntities():
Entity[]
A list of entities which has a reference to this entity.
Returns
Entity[]
Inherited from
getTypeName()
staticgetTypeName():string
Returns the type name of this class.
Returns
string
Overrides
getTypeName()
getTypeName():
string
Returns the name of this object's type.
Returns
string
Inherited from
isOfType()
isOfType(
type):boolean
Returns true if the object is of the specified type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
isSame()
isSame(
other):boolean
Returns true if this object refers to the same instance as the given object.
Parameters
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean
Inherited from
isScriptInputHidden()
isScriptInputHidden(
inputName):boolean
Returns true if the script inpput is hidden from the scene.
Parameters
| Parameter | Type |
|---|---|
inputName | string |
Returns
boolean
Inherited from
ScriptAsset.isScriptInputHidden
setScriptInputHidden()
setScriptInputHidden(
inputName,hidden):void
Used when you'd like to hide inputs from users in the scene.
Parameters
| Parameter | Type |
|---|---|
inputName | string |
hidden | boolean |
Returns
void