Resource

Base class for all resources.

Resource is the base class for all resource types. Resources are primarily data containers. They are reference counted and freed when no longer in use. They are also loaded only once from disk, and further attempts to load the resource will return the same reference (all this in contrast to a Node, which is not reference counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a Node or another resource.

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Functions

_setupLocalToScene
void _setupLocalToScene()
duplicate
Ref!Resource duplicate(bool subresources)
getLocalScene
Node getLocalScene()
getName
String getName()
getPath
String getPath()
getRid
RID getRid()

Return the RID of the resource (or an empty RID). Many resources (such as Texture, Mesh, etc) are high level abstractions of resources stored in a server, so this function will return the original RID.

isLocalToScene
bool isLocalToScene()
opAssign
Resource opAssign(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(Resource other)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(typeof(null) n)
Undocumented in source. Be warned that the author may not have intended to support it.
setLocalToScene
void setLocalToScene(bool enable)
setName
void setName(StringArg0 name)
setPath
void setPath(StringArg0 path)
setupLocalToScene
void setupLocalToScene()
takeOverPath
void takeOverPath(StringArg0 path)

Set the path of the resource. Differs from set_path(), if another Resource exists with "path" it over-takes it, instead of failing.

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

resourceLocalToScene
bool resourceLocalToScene [@property getter]
bool resourceLocalToScene [@property setter]
resourceName
String resourceName [@property setter]
resourceName
String resourceName [@property getter]
resourcePath
String resourcePath [@property getter]
String resourcePath [@property setter]

Static functions

_new
Resource _new()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

_classBinding
struct _classBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
ToRef as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta