Synapse Objects

When using the Synapse API will you encounter a lot of different Synapse Objects. SynapseObjects are Objects that inherits ISynapseObject and are a Wrapper for various other Objects in game.

This is the code of the Interface so every SynapseObject has these Properties and methods

public interface ISynapseObject
{
    public Dictionary<string, object> ObjectData { get; set; }
    public List<string> CustomAttributes { get; set; }
    public Vector3 Position { get; set; }
    public Quaternion Rotation { get; set; }
    public Vector3 Scale { get; set; }
    public GameObject GameObject { get; }
    public Rigidbody Rigidbody { get; }
    public ObjectType Type { get; }
    public ISynapseObject Parent { get; set; }
    public ISynapseObject RootParent { get; }
    public void RemoveParent();
    public void ApplyPhysics();
    public void Destroy();
    public void OnDestroy();
    public void HideFromAll();
    public void ShowAll();
    public void HideFromPlayer(SynapsePlayer player);
    public void ShowPlayer(SynapsePlayer player);
}

Every SynapseObject is assigned to one Unity Gameobject which has a Component named SynapseObjectScript that contains the actual SynapseObject.

Most SynapseObjects are stored inside the MapService and you can get all with Synapse.Get<MapService>.SynapseObjects

Here is a list of all SynapseObjects

Last updated