diff --git a/Runtime/Scripts/Data/Entities/InworldProjectData.cs b/Runtime/Scripts/Data/Entities/InworldProjectData.cs index ade3e30..eccd5e1 100644 --- a/Runtime/Scripts/Data/Entities/InworldProjectData.cs +++ b/Runtime/Scripts/Data/Entities/InworldProjectData.cs @@ -45,6 +45,12 @@ public class InworldProjectData public List workspaceInfo; public List ownerInfo; public List collaboratorInfo; + + [JsonIgnore] public string DisplayName => name.Substring(name.LastIndexOf('/') + 1); + + [JsonIgnore] + public List WorkspaceList => workspaceInfo.Select(ws => ws.displayName).ToList(); + } [Serializable] public class ListProjectResponse diff --git a/Runtime/Scripts/Data/ScriptableObjects/InworldUserSetting.cs b/Runtime/Scripts/Data/ScriptableObjects/InworldUserSetting.cs index 7cd0e61..66f63eb 100644 --- a/Runtime/Scripts/Data/ScriptableObjects/InworldUserSetting.cs +++ b/Runtime/Scripts/Data/ScriptableObjects/InworldUserSetting.cs @@ -100,6 +100,7 @@ public string ID /// Get the workspace list by workspace full name. /// public List WorkspaceList => m_Workspaces.Select(ws => ws.displayName).ToList(); + public InworldProjectData GetProjectByDisplayName(string displayName) => m_Projects.FirstOrDefault(proj => proj.name.Contains(displayName)); /// /// Get the workspace full name by its display name ///