Enfusion Script API
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
Resource Interface Reference

Object hoding reference to resource. More...

Inheritance diagram for Resource:
[legend]

Public Member Functions

proto external BaseResourceObject GetResource ()
 
proto external bool IsValid ()
 
- Public Member Functions inherited from Managed
proto external ref Managed Clone ()
 Return shallow copy of object, or null if it is not allowed (not public constructor)
 

Static Public Member Functions

static proto ref Resource Load (ResourceName name)
 Loads object from data, or gets it from cache.
 

Detailed Description

Object hoding reference to resource.

In destructor release the resource

// load
Resource resource = Resource.Load(prefabResourceName);
if (resoruce.IsValid())
{
IEntity rootBall = GetGame().SpawnEntityPrefab(resource);
}
// At the end of scope is resoruce released.
Definition: IEntity.c:13
Object hoding reference to resource.
Definition: Resource.c:25
static proto ref Resource Load(ResourceName name)
Loads object from data, or gets it from cache.

Member Function Documentation

◆ GetResource()

proto external BaseResourceObject Resource.GetResource ( )

◆ IsValid()

proto external bool Resource.IsValid ( )

◆ Load()

static proto ref Resource Resource.Load ( ResourceName  name)
static

Loads object from data, or gets it from cache.


The documentation for this interface was generated from the following file: