Sansar Script API
Sansar uses C# scripts to provide dynamic behaviors and interactions.
Documentation for the Sansar script API.
// Subscribe to Add User events. Use SessionId.Invalid to track all users. ScenePrivate.User.Subscribe(UserEvents.AddUser, SessionId.Invalid, AddUser);// Lookup the name of the agent. string name = ScenePrivate.FindAgent(User).AgentInfo.Name; ScenePrivate.Chat.MessageAllUsers(string.Format("Welcome {0}!", name));
Have more questions? Ask in our Discord!
Last updated