From Intrigues Wiki

Role Class - ID Property


The ID property in the Role class uniquely identifies each role within the game.


[field: SerializeField] public string ID { get; private set; }


This property holds a unique identifier for a role, ensuring that each role can be distinctly recognized and referred to within the game's systems. It's crucial for managing roles in gameplay, scripting, and data storage.


Use ID to reference or manipulate specific roles in game logic, such as assigning roles to actors or triggering role-specific events.

Example of Usage

public class RoleManager : MonoBehaviour {
    private Role leaderRole;

    void Start() {
        // Fetching the 'Leader' role
        leaderRole = IM.GetRole("Leader");

        if (leaderRole != null) {
            Debug.Log($"Leader Role ID: {leaderRole.ID}");


  • The ID is typically used in scenarios where roles need to be identified or processed programmatically.
  • It is crucial for maintaining consistency and accuracy in role management, especially in complex systems involving multiple roles.