Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ MonoBehaviour:
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 2b9d4f1a7e8c3b6d5a2f9e1c4b7a8d3f
m_Address: Packages/com.basis.sdk/Textures/Runtime/unlink-outline.png
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 2f02813bc29de864cb7a5a27364ee32a
m_Address: Packages/com.basis.sdk/Prefabs/Panel Elements/PE Image Simple Square.prefab
m_ReadOnly: 0
Expand Down Expand Up @@ -209,6 +214,11 @@ MonoBehaviour:
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 4e8a2c9b1d3f6e7a8b9c0d1e2f3a4b5c
m_Address: Packages/com.basis.sdk/Textures/Runtime/scan-outline.png
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 50f97b6b5d2b5cd4993f1fd38883bde8
m_Address: Packages/com.basis.sdk/Sprites/Icons/Exit.png
m_ReadOnly: 0
Expand Down Expand Up @@ -302,6 +312,11 @@ MonoBehaviour:
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 75dcae065f0db18479883c0f554885bf
m_Address: Packages/com.basis.sdk/Textures/Runtime/trash-bin-outline.png
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 7789be676b03fdd4f8d2e4b183e25858
m_Address: Packages/com.basis.sdk/Textures/Runtime/clock.png
m_ReadOnly: 0
Expand All @@ -323,6 +338,11 @@ MonoBehaviour:
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 7f3a1d8b4c6e9f2a5b8c3d1e6f4a9b2c
m_Address: Packages/com.basis.sdk/Textures/Runtime/link-outline.png
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 7f82d6af13c883d4b885adbeab63a58d
m_Address: Packages/com.basis.sdk/Textures/Runtime/exit-outline.png
m_ReadOnly: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ public static class Sprites
public static string MicrophoneMute = "Packages/com.basis.sdk/Textures/Runtime/microphone-mute-solid.png";
public static string People = "Packages/com.basis.sdk/Textures/Runtime/people-outline.png";

// row-action icons (Library Instantiated tab)
public static string Select = "Packages/com.basis.sdk/Textures/Runtime/scan-outline.png";
public static string TeleportTo = "Packages/com.basis.sdk/Textures/Runtime/Teleport.png";
public static string Trash = "Packages/com.basis.sdk/Textures/Runtime/trash-bin-outline.png";
public static string Link = "Packages/com.basis.sdk/Textures/Runtime/link-outline.png";
public static string Unlink = "Packages/com.basis.sdk/Textures/Runtime/unlink-outline.png";

// embedded items
public static string Embedded = "Packages/com.basis.sdk/Textures/Runtime/embedded.png";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1916,17 +1916,18 @@ private static void CreateListEntry(BasisRuntimeSpawnRegistry.SpawnInstance item
itemTextInfo.Descriptor.SetHeight(50);
itemTextInfo.Descriptor.SetWidth(400);

PanelButton selectItem = PanelButton.CreateNew(ButtonStyles.AcceptButton, itemListPanel.TabButtonParent);
selectItem.Descriptor.SetTitle(hasSelected ? BasisLocalization.Get("library.deselect") : BasisLocalization.Get("library.select"));
selectItem.SetSize(new Vector2(200, 60));

// determine if we can select this item
if (selectItem.Descriptor.gameObject.TryGetComponent<Button>(out Button selectButtonComponent))
// Skip the row-action buttons for scene-mode and embedded rows — not user-owned spawns.
if (itemKey.SpawnMode == BasisRuntimeSpawnRegistry.SpawnMode.Scene
|| itemKey.SpawnMethod == BasisRuntimeSpawnRegistry.SpawnMethod.Embedded)
{
// for the moment disable selecting embedded items
selectButtonComponent.interactable = (itemKey.SpawnMode != BasisRuntimeSpawnRegistry.SpawnMode.Scene) && !(itemKey.SpawnMethod == BasisRuntimeSpawnRegistry.SpawnMethod.Embedded);
return;
}

PanelButton selectItem = PanelButton.CreateNew(ButtonStyles.AcceptButton, itemListPanel.TabButtonParent);
selectItem.Descriptor.SetTitle(string.Empty);
selectItem.SetIcon(AddressableAssets.Sprites.Select);
selectItem.SetSize(new Vector2(80, 80));

selectItem.OnClicked += async () =>
{
if(hasSelected)
Expand All @@ -1947,14 +1948,9 @@ private static void CreateListEntry(BasisRuntimeSpawnRegistry.SpawnInstance item
};

PanelButton TeleportToItem = PanelButton.CreateNew(ButtonStyles.StandardButton, itemListPanel.TabButtonParent);
TeleportToItem.Descriptor.SetTitle(BasisLocalization.Get("library.teleportTo"));
TeleportToItem.SetSize(new Vector2(200, 60));
// dont let the teleport button work for scenes yet
if (TeleportToItem.Descriptor.gameObject.TryGetComponent<Button>(out Button teleportButtonComponent))
{
// if the item is embedded only allow an admin to interact
teleportButtonComponent.interactable = !(itemKey.SpawnMode == BasisRuntimeSpawnRegistry.SpawnMode.Scene);
}
TeleportToItem.Descriptor.SetTitle(string.Empty);
TeleportToItem.SetIcon(AddressableAssets.Sprites.TeleportTo);
TeleportToItem.SetSize(new Vector2(80, 80));

TeleportToItem.OnClicked += () =>
{
Expand Down Expand Up @@ -1985,8 +1981,9 @@ private static void CreateListEntry(BasisRuntimeSpawnRegistry.SpawnInstance item
};

PanelButton removeItem = PanelButton.CreateNew(ButtonStyles.CancelButton, itemListPanel.TabButtonParent);
removeItem.Descriptor.SetTitle(BasisLocalization.Get("library.remove"));
removeItem.SetSize(new Vector2(200, 60));
removeItem.Descriptor.SetTitle(string.Empty);
removeItem.SetIcon(AddressableAssets.Sprites.Trash);
removeItem.SetSize(new Vector2(80, 80));

// only apply this to items that are spawned on the network
if(itemKey.SpawnMethod == BasisRuntimeSpawnRegistry.SpawnMethod.Network)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
130 changes: 130 additions & 0 deletions Basis/Packages/com.basis.sdk/Textures/Runtime/link-outline.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
130 changes: 130 additions & 0 deletions Basis/Packages/com.basis.sdk/Textures/Runtime/scan-outline.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading