Frame API to give access to C# unsafe pointers and advanced immediate operations. More...
Inherits IDisposable.
Public Member Functions | |
FrameBaseUnsafe (FrameBase frame) | |
Create FrameBaseUnsafe from a FrameBase. More... | |
void | CommitAllCommands () |
Trigger the execution of entity and component deletion. More... | |
ComponentGetter< T > | ComponentGetter< T > () |
Retrieves a ComponentGetter instance for the specified component type T from a FrameBaseUnsafe object. More... | |
void | Dispose () |
Dispose the FrameBaseUnsafe instance. More... | |
ComponentFilterStruct< T > | FilterStruct< T > (ComponentSet without=default, ComponentSet any=default, Int32? offset=null, Int32? count=null) |
Returns a filtered ComponentFilterStruct instance for the specified type T. More... | |
ComponentBlockIterator< T > | GetComponentBlockIterator< T > () |
Get a component iterator that cycles blocks of component pointers. More... | |
ComponentBlockIterator< T > | GetComponentBlockIterator< T > (int offset, int count) |
Get a component iterator that cycles blocks of component pointers, using a start offset and count More... | |
void * | GetOrAddSingletonPointer (int componentIndex, EntityRef optionalAddTarget=default) |
Retrieves a pointer to the specified singleton component, creating it if it doesn't exist. More... | |
T * | GetOrAddSingletonPointer< T > (EntityRef optionalAddTarget=default) |
Get or add a pointer to the singleton component of type T in the Frame. More... | |
void * | GetPointer (EntityRef entityRef, int componentIndex) |
Gets a pointer to a component that can be changed directly without writing the component back with Set<T>(EntityRef, T). More... | |
T * | GetPointer< T > (EntityRef entityRef) |
Gets a pointer to a component that can be changed directly without writing the component back with Set<T>(EntityRef, T). More... | |
void * | GetPointerSingleton (int componentIndex) |
Get a pointer to the singleton instance of the specified component type. More... | |
void * | GetPointerSingleton (Type componentType) |
Returns a pointer to the singleton component of type T. More... | |
T * | GetPointerSingleton< T > () |
bool | TryGetPointer (EntityRef entityRef, int componentIndex, out void *value) |
Similar to GetPointer(EntityRef, int) but does not throw an exception if the component is not present. More... | |
bool | TryGetPointer< T > (EntityRef entityRef, out T *value) |
Similar to GetPointer<T>(EntityRef) but does not throw an exception if the component is not present. More... | |
bool | TryGetPointerSingleton (int componentIndex, out void *component) |
Try to get a pointer to the specified component singleton in the current frame. More... | |
bool | TryGetPointerSingleton< T > (out T *component) |
Tries to get a pointer to a component singleton of type T. More... | |
bool | TryGetPointerSingleton< T > (Type componentType, out void *component) |
Tries to get a pointer to the singleton component of type T. More... | |
Frame API to give access to C# unsafe pointers and advanced immediate operations.
Usage: Frame.Unsafe.Get
|
inline |
Create FrameBaseUnsafe from a FrameBase.
frame | Frame |
|
inline |
Get a component iterator that cycles blocks of component pointers.
T | Component type |
T | : | unmanaged | |
T | : | IComponent |
|
inline |
Get a component iterator that cycles blocks of component pointers, using a start offset and count
T | Component type |
offset | Offset of entities we want |
count | How many entities we want |
T | : | unmanaged | |
T | : | IComponent |
|
inline |
Returns a filtered ComponentFilterStruct instance for the specified type T.
without | The ComponentSet specifying components that the filtering should exclude. |
any | The ComponentSet specifying components that at least one of them should be present in the filtering result. |
offset | The optional offset specifying the starting index of the filtering result. |
count | The optional count specifying the number of elements in the filtering result. |
T | The type of components to filter. |
T | : | unmanaged |
|
inline |
Retrieves a ComponentGetter instance for the specified component type T from a FrameBaseUnsafe object.
T | The type of the component to retrieve |
T | : | unmanaged |
|
inline |
Gets a pointer to a component that can be changed directly without writing the component back with Set<T>(EntityRef, T).
entityRef | Entity reference |
componentIndex | Component index defined by ComponentTypeId{T}.Id. |
InvalidOperationException | Thrown when the entity does not exist |
InvalidOperationException | Thrown when the requested component index is invalid. |
|
inline |
Trigger the execution of entity and component deletion.
|
inline |
Returns a pointer to the singleton component of type T.
componentType | The type of the singleton component. |
The component type T must implement the IComponentSingleton interface and be unmanaged.
|
inline |
Get a pointer to the singleton instance of the specified component type.
componentIndex | The index of the component type. |
|
inline |
Tries to get a pointer to a component singleton of type T.
T | The type of the component singleton. |
component | The pointer to the component singleton if found, otherwise null . |
true
if the pointer to the component singleton was successfully obtained, otherwise false
.T | : | unmanaged | |
T | : | IComponentSingleton |
|
inline |
Tries to get a pointer to the singleton component of type T.
componentType | The type of the singleton component. |
component | A pointer to the singleton component. |
true
if the singleton component was successfully found and the pointer was obtained, false
otherwise.
|
inline |
Try to get a pointer to the specified component singleton in the current frame.
componentIndex | The index of the component singleton. |
component | A pointer to the component, if it exists; otherwise, null . |
true
if the component singleton exists and a pointer is successfully obtained; otherwise, false
.
|
inline |
Get or add a pointer to the singleton component of type T in the Frame.
T | Type of the singleton component |
optionalAddTarget | Optional entity reference to add the singleton component to, if it doesn't already exist |
T | : | unmanaged | |
T | : | IComponentSingleton |
|
inline |
Retrieves a pointer to the specified singleton component, creating it if it doesn't exist.
componentIndex | The index of the component. |
optionalAddTarget | The entity reference to add the singleton component if it doesn't exist. |
|
inline |
Dispose the FrameBaseUnsafe instance.