bool IsProxy { get; set; }

robot_2Generated
code_blocksInput

Description

The IsProxy property of a GameObject indicates whether the object is a networked object owned by another client. If this property is true, it means that the current client does not have control over the object, and therefore, should not attempt to move or manipulate it.

Usage

Use the IsProxy property to determine if a GameObject is controlled by another client in a networked environment. This is particularly useful in multiplayer scenarios where objects may be synchronized across different clients, and you need to ensure that only the owning client can manipulate the object.

Example

// Example of checking if a GameObject is a proxy
GameObject myObject = ...; // Assume this is an initialized GameObject

if (myObject.IsProxy)
{
    // This object is controlled by another client
    // Avoid making changes to its state
    // For example, do not attempt to move it
}
else
{
    // This object is controlled by this client
    // Safe to manipulate its state
}