Urho.Resources.Resource Class

Base class for resources.

See Also: Resource

Syntax

public class Resource : UrhoObject

Requirements

Namespace: Urho.Resources
Assembly: Urho (in Urho.dll)
Assembly Versions: 1.0.0.0

The members of Urho.Resources.Resource are listed below.

See Also: UrhoObject

Public Constructors

Constructs a new instance of Urho.Resources.Resource which is tied to the Application.CurrentContext.
Constructs a new instance of Urho.Resources.Resource, given a raw pointer to an unmanaged object
Constructs a new instance of Urho.Resources.Resource linked to a specific Context.

Protected Constructors

Empty constructor, chain to this constructor when you provide your own constructor that sets the handle field.

Public Properties

AsyncLoadStateAsyncLoadState. Return the asynchronous loading state. Or Set the asynchronous loading state. Called by ResourceCache. Resources in the middle of asynchronous loading are not normally returned to user.
MemoryUseUInt32. Return memory use in bytes, possibly approximate. Or Set memory use in bytes, possibly approximate.
NameString. Return name. Or Set name.
[read-only]
NameHashStringHash. Return name hash.
[read-only]
override
TypeStringHash. Urho's type system type.
[read-only]
override
TypeNameString. Urho's low-level type name.
[read-only]
static
TypeNameStaticString. Urho's low-level type name, accessible as a static method.
[read-only]
static
TypeStaticStringHash. Urho's low-level type, accessible as a static method.
[read-only]
UseTimerUInt32. Return time since last use in milliseconds. If referred to elsewhere than in the resource cache, returns always zero.

Public Methods

BeginLoad(File) : Boolean
Load resource from stream. May be called from a worker thread. Return true if successful.
BeginLoad(MemoryBuffer) : Boolean
EndLoad() : Boolean
Finish resource loading. Always called from the main thread. Return true if successful.
Load(String) : Boolean
Load resource from file.
Load(File) : Boolean
Load resource synchronously. Call both BeginLoad() & EndLoad() and return true if both succeeded.
Load(MemoryBuffer) : Boolean
ResetUseTimer()
Reset last used timer.
Save(String) : Boolean
Save resource to file.
Save(File) : Boolean
Save resource to file.
Save(MemoryBuffer) : Boolean
SubscribeToReloadFailed(Action<Urho.Resources.ReloadFailedEventArgs>) : Subscription
Subscribes to the ReloadFailed event raised by the Resource.
SubscribeToReloadFinished(Action<Urho.Resources.ReloadFinishedEventArgs>) : Subscription
Subscribes to the ReloadFinished event raised by the Resource.
SubscribeToReloadStarted(Action<Urho.Resources.ReloadStartedEventArgs>) : Subscription
Subscribes to the ReloadStarted event raised by the Resource.

Public Events

ReloadFailedResource reloading failed.
ReloadFinishedResource reloading finished.
ReloadStartedResource reloading started.