Add NetworkReplicator::MapObjectId for networked object identifies mapping
This commit is contained in:
@@ -1302,6 +1302,11 @@ bool NetworkReplicator::HasObject(const ScriptingObject* obj)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NetworkReplicator::MapObjectId(Guid& objectId)
|
||||||
|
{
|
||||||
|
IdsRemappingTable.TryGet(objectId, objectId);
|
||||||
|
}
|
||||||
|
|
||||||
ScriptingObject* NetworkReplicator::ResolveForeignObject(Guid objectId)
|
ScriptingObject* NetworkReplicator::ResolveForeignObject(Guid objectId)
|
||||||
{
|
{
|
||||||
if (const auto& object = ResolveObject(objectId))
|
if (const auto& object = ResolveObject(objectId))
|
||||||
|
|||||||
@@ -116,6 +116,12 @@ public:
|
|||||||
/// <param name="obj">The network object.</param>
|
/// <param name="obj">The network object.</param>
|
||||||
/// <returns>True if object exists in networking, otherwise false.</returns>
|
/// <returns>True if object exists in networking, otherwise false.</returns>
|
||||||
API_FUNCTION() static bool HasObject(const ScriptingObject* obj);
|
API_FUNCTION() static bool HasObject(const ScriptingObject* obj);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Maps object ID into server or client ID (depending on the source ID). Leaves source value unchanged if that specific ID is unused.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="objectId">The network object identifier to map. Contains result ID once the method completes.</param>
|
||||||
|
API_FUNCTION() static void MapObjectId(API_PARAM(Ref) Guid& objectId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Resolves foreign Guid into a local ScriptingObject
|
/// Resolves foreign Guid into a local ScriptingObject
|
||||||
|
|||||||
Reference in New Issue
Block a user