Merge branch 'foreignobject' of https://github.com/Withaust/FlaxEngine into Withaust-foreignobject
This commit is contained in:
@@ -941,6 +941,13 @@ bool NetworkReplicator::HasObject(const ScriptingObject* obj)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ScriptingObject* NetworkReplicator::ResolveForeignObject(Guid objectId)
|
||||||
|
{
|
||||||
|
if (const auto& object = ResolveObject(objectId))
|
||||||
|
return object->Object.Get();
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
uint32 NetworkReplicator::GetObjectOwnerClientId(const ScriptingObject* obj)
|
uint32 NetworkReplicator::GetObjectOwnerClientId(const ScriptingObject* obj)
|
||||||
{
|
{
|
||||||
uint32 id = NetworkManager::ServerClientId;
|
uint32 id = NetworkManager::ServerClientId;
|
||||||
|
|||||||
@@ -116,6 +116,13 @@ 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>
|
||||||
|
/// Resolves foreign Guid into a local ScriptingObject
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="objectId">The Guid of a foreign object.</param>
|
||||||
|
/// <returns>Object if managed to resolve, otherwise null.</returns>
|
||||||
|
API_FUNCTION() static ScriptingObject* ResolveForeignObject(Guid objectId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the Client Id of the network object owner.
|
/// Gets the Client Id of the network object owner.
|
||||||
|
|||||||
Reference in New Issue
Block a user