Add NetworkReplicationNode::GetObject
This commit is contained in:
@@ -63,6 +63,17 @@ bool NetworkReplicationNode::RemoveObject(ScriptingObject* obj)
|
|||||||
return !Objects.Remove(obj);
|
return !Objects.Remove(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool NetworkReplicationNode::GetObject(ScriptingObject* obj, NetworkReplicationHierarchyObject& result)
|
||||||
|
{
|
||||||
|
const int32 index = Objects.Find(obj);
|
||||||
|
if (index != -1)
|
||||||
|
{
|
||||||
|
result = Objects[index];
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool NetworkReplicationNode::DirtyObject(ScriptingObject* obj)
|
bool NetworkReplicationNode::DirtyObject(ScriptingObject* obj)
|
||||||
{
|
{
|
||||||
const int32 index = Objects.Find(obj);
|
const int32 index = Objects.Find(obj);
|
||||||
|
|||||||
@@ -200,6 +200,14 @@ API_CLASS(Abstract, Namespace = "FlaxEngine.Networking") class FLAXENGINE_API Ne
|
|||||||
/// <returns>True on successful removal, otherwise false.</returns>
|
/// <returns>True on successful removal, otherwise false.</returns>
|
||||||
API_FUNCTION() virtual bool RemoveObject(ScriptingObject* obj);
|
API_FUNCTION() virtual bool RemoveObject(ScriptingObject* obj);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets object from the hierarchy.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="obj">The object to get.</param>
|
||||||
|
/// <param name="result">The hierarchy object to retrieve.</param>
|
||||||
|
/// <returns>True on successful retrieval, otherwise false.</returns>
|
||||||
|
API_FUNCTION() bool GetObject(ScriptingObject* obj, NetworkReplicationHierarchyObject& result);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Force replicates the object during the next update. Resets any internal tracking state to force the synchronization.
|
/// Force replicates the object during the next update. Resets any internal tracking state to force the synchronization.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user