ProtectedbridgeInternal bridge access
Gets the COGS resource ID of the Resource
resource ID
InternalSet resource id
Returns flag marking if resource is released
Gets the optional name
name of the resource
Gets the optional path.
path. Only set for AssetResource created. null for Wrapped.
ProtectedruntimeInternal runtime access
Compare two Cogs Resource types for equality.
Other resource.
True if same Resource class type & ID and belongs to same Cogs instance.
ProtectedequalsCompare two Cogs Resource types for equality.
Other resource.
True if same Resource class type & ID and belongs to same Cogs instance.
Internal: Release AssetResource resources after use There is no exposed release for AssetResource in Cogs.
ProtectedlogLog error message
Release to free resources after use. Also release local handle after creating resource and passing to Cogs.
const model = runtime.ModelEntity.create("Model");
const modelResource: runtime.resources.loadModel(modelPath);
model.modelComponent.model = modelResource;
modelResource.release(); // ModelComponent now sole owner
internalRelease for actual release.
StaticcreateInternal: instance creator by runtime.resources.loadAsset()
Cogs runtime instance.
Path to load.
Optionalflags: AssetLoadFlagsOptional Asset loading flags. Default: AssetLoadFlags.None
Created instance
StaticcreateInternal: Create a AssetResource from existing resource Called from field getter for AssetResource
Cogs AssetResource Resource.
Created by: Cogs.Resources.loadAsset() Release using: AssetResource.release()