Skip to content

Commit

Permalink
[CCK.Debugger] Added a check if a prop has a collider before attempti…
Browse files Browse the repository at this point in the history
…ng to highlight.
  • Loading branch information
kafeijao committed Sep 10, 2022
1 parent f239ef7 commit 3a1f753
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions CCK.Debugger/Components/MenuHandlers/AvatarMenuHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public class AvatarMenuHandler : IMenuHandler {

static AvatarMenuHandler() {

// Todo: Allow to inspect other people's avatars if they give permission
// Todo: Waiting for bios
List<CVRPlayerEntity> players = new();
//List<CVRPlayerEntity> players = CVRPlayerManager.Instance.NetworkPlayers;

Expand Down Expand Up @@ -76,8 +78,6 @@ public void Update(Menu menu) {

PlayerEntities.UpdateViaSource();

// Waiting for players to give permission to see their parameters, via some info on the bio or something
// Since it might come back (with a way to consent), I did a small hack to disable it instead of removing
var playerCount = PlayerEntities.Count;

var isLocal = PlayerEntities.CurrentObject == null;
Expand Down Expand Up @@ -133,4 +133,4 @@ public void Update(Menu menu) {
foreach (var entry in ParameterEntry.Entries) entry.Update();
}
}
}
}
4 changes: 2 additions & 2 deletions CCK.Debugger/Components/MenuHandlers/SpawnableMenuHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ public void Update(Menu menu) {
// Update the menus if the spawnable changed
if (PropsData.HasChanged) {

// Place the highlighter on the first collider found
// Place the highlighter on the first collider found (if present)
var firstCollider = currentSpawnable.transform.GetComponentInChildren<Collider>();
Highlighter.SetTargetHighlight(firstCollider.gameObject);
if (firstCollider != null) Highlighter.SetTargetHighlight(firstCollider.gameObject);

// Restore parameters
menu.ClearCategory(_categorySyncedParameters);
Expand Down
2 changes: 1 addition & 1 deletion CCK.Debugger/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

namespace CCK.Debugger.Properties;
internal static class AssemblyInfoParams {
public const string Version = "1.0.2";
public const string Version = "1.0.3";
public const string Author = "kafeijao";
public const string Name = "CCK.Debugger";
}
Expand Down

0 comments on commit 3a1f753

Please sign in to comment.