Skip to content

Commit

Permalink
Merge pull request #17 from DerpyNewbie/feature/categorize-add-component
Browse files Browse the repository at this point in the history
Categorize all components below `Newbie Commons/` submenu in Add Component
  • Loading branch information
DerpyNewbie authored Nov 3, 2024
2 parents 4d3412f + f3f23f5 commit e039956
Show file tree
Hide file tree
Showing 28 changed files with 45 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace DerpyNewbie.Common
{
[AddComponentMenu("Newbie Commons/Utils/Deactivate After Start")]
[UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)]
public class DeactivateAfterStart : UdonSharpBehaviour
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace DerpyNewbie.Common
{
[AddComponentMenu("Newbie Commons/Utils/Environment Sound Player")]
[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
public class EnvironmentSoundPlayer : UdonSharpBehaviour
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
namespace DerpyNewbie.Common.Invoker
using UnityEngine;

namespace DerpyNewbie.Common.Invoker
{
[AddComponentMenu("Newbie Commons/Invoker/Interact Event")]
public class InteractEventInvoker : CommonInvokerBase
{
public override void Interact()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace DerpyNewbie.Common.Invoker
{
[AddComponentMenu("Newbie Commons/Invoker/On Player Trigger Enter Event")]
public class OnPlayerTriggerEnterInvoker : CommonInvokerBase
{
[SerializeField]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

namespace DerpyNewbie.Common.Invoker
{
[AddComponentMenu("Newbie Commons/Invoker/Pickup Event")]
public class PickupEventInvoker : CommonInvokerBase
{
[SerializeField] private PickupEventType eventType = PickupEventType.All;
Expand Down
1 change: 1 addition & 0 deletions Packages/dev.derpynewbie.common/Runtime/LineDrawer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace DerpyNewbie.Common
/// </summary>
/// <seealso cref="LineManager"/>
/// <seealso cref="LineManager.Draw(Vector3[], float, float, float, Gradient)"/>
[AddComponentMenu("Newbie Commons/Utils/Line Drawer")]
[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
public class LineDrawer : UdonSharpBehaviour
{
Expand Down
1 change: 1 addition & 0 deletions Packages/dev.derpynewbie.common/Runtime/LineManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace DerpyNewbie.Common
/// <summary>
/// Useful line drawing manager for debug visualization purposes.
/// </summary>
[AddComponentMenu("Newbie Commons/Utils/Line Manager")]
[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
public class LineManager : UdonSharpBehaviour
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace DerpyNewbie.Common
{
[AddComponentMenu("Newbie Commons/Utils/Local Player Follower")]
[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
public class LocalPlayerFollower : UdonSharpBehaviour
{
Expand Down
1 change: 1 addition & 0 deletions Packages/dev.derpynewbie.common/Runtime/Megaphone.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

namespace DerpyNewbie.Common
{
[AddComponentMenu("Newbie Commons/Utils/Megaphone")]
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
public class Megaphone : PickupEventSenderCallback
{
Expand Down
1 change: 1 addition & 0 deletions Packages/dev.derpynewbie.common/Runtime/MirrorHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace DerpyNewbie.Common
{
[AddComponentMenu("Newbie Commons/Utils/Mirror Handler")]
[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
public class MirrorHandler : UdonSharpBehaviour
{
Expand Down
2 changes: 2 additions & 0 deletions Packages/dev.derpynewbie.common/Runtime/MirrorView.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
using UdonSharp;
using UnityEngine;

namespace DerpyNewbie.Common
{
[AddComponentMenu("Newbie Commons/Utils/Mirror View")]
[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
public class MirrorView : UdonSharpBehaviour
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace DerpyNewbie.Common
{
[AddComponentMenu("Newbie Commons/Utils/Object Player Follower")]
[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
public class ObjectPlayerFollower : UdonSharpBehaviour
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@

namespace DerpyNewbie.Common.ObjectPool
{
[UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)] [RequireComponent(typeof(VRCObjectPool))]
[AddComponentMenu("Newbie Commons/Object Pool/Proxy")]
[UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)]
[RequireComponent(typeof(VRCObjectPool))]
public class ObjectPoolProxy : UdonSharpBehaviour
{
private VRCObjectPool _pool;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
using UdonSharp;
using UnityEngine;
using VRC.SDK3.Components;
using VRC.SDKBase;

namespace DerpyNewbie.Common.ObjectPool
{
[AddComponentMenu("Newbie Commons/Object Pool/Returner")]
[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
public class ObjectPoolReturner : UdonSharpBehaviour
{
Expand All @@ -12,7 +14,7 @@ public class ObjectPoolReturner : UdonSharpBehaviour

private void OnCollisionEnter(Collision collision)
{
if (collision == null || collision.gameObject == null)
if (collision == null || collision.gameObject == null || Networking.IsOwner(gameObject))
return;

ReturnObject(collision.gameObject);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ MonoBehaviour:
sourceCsScript: {fileID: 11500000, guid: d12b43c989c4fe9499292645c563f576, type: 3}
scriptVersion: 2
compiledVersion: 2
behaviourSyncMode: 1
behaviourSyncMode: 2
hasInteractEvent: 1
scriptID: -8601526528295884678
serializationData:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

namespace DerpyNewbie.Common.ObjectPool
{
[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
[AddComponentMenu("Newbie Commons/Object Pool/Spawner")]
[UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)]
public class ObjectPoolSpawner : UdonSharpBehaviour
{
[SerializeField] private ObjectPoolProxy targetProxy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

namespace DerpyNewbie.Common
{
[RequireComponent(typeof(VRCPickup)), UdonBehaviourSyncMode(BehaviourSyncMode.None)]
[AddComponentMenu("Newbie Commons/Utils/Object Position Resetter")]
[RequireComponent(typeof(VRCPickup))]
[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
public class ObjectPositionResetter : UdonSharpBehaviour
{
private VRCPickup _pickup;
Expand Down
1 change: 1 addition & 0 deletions Packages/dev.derpynewbie.common/Runtime/PlayerMovement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

namespace DerpyNewbie.Common
{
[AddComponentMenu("Newbie Commons/Utils/Player Movement")]
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
public class PlayerMovement : UdonSharpBehaviour
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace DerpyNewbie.Common
{
[AddComponentMenu("Newbie Commons/Utils/Player Voice Store")]
[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
public class PlayerVoiceStore : UdonSharpBehaviour
{
Expand Down
1 change: 1 addition & 0 deletions Packages/dev.derpynewbie.common/Runtime/Role/RoleData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace DerpyNewbie.Common.Role
{
[AddComponentMenu("Newbie Commons/Role/Role Data")]
[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
public class RoleData : UdonSharpBehaviour
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace DerpyNewbie.Common.Role
{
[AddComponentMenu("Newbie Commons/Role/Role Manager")]
[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
public class RoleManager : RoleProvider
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace DerpyNewbie.Common.Role
{
[AddComponentMenu("Newbie Commons/Role/Player Data")]
[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
public class RolePlayerData : UdonSharpBehaviour
{
Expand Down
4 changes: 3 additions & 1 deletion Packages/dev.derpynewbie.common/Runtime/Teleporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

namespace DerpyNewbie.Common
{
[RequireComponent(typeof(Collider)), UdonBehaviourSyncMode(BehaviourSyncMode.None)]
[AddComponentMenu("Newbie Commons/Utils/Teleporter")]
[RequireComponent(typeof(Collider))]
[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
public class Teleporter : UdonSharpBehaviour
{
[SerializeField]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

namespace DerpyNewbie.Common
{
[UdonBehaviourSyncMode(BehaviourSyncMode.None)] [DefaultExecutionOrder(0)]
[AddComponentMenu("Newbie Commons/Utils/Translatable Message")]
[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
[DefaultExecutionOrder(0)]
public class TranslatableMessage : UdonSharpBehaviour
{
[SerializeField] [InspectorName("ja-JP Message")] [TextArea(3, 10)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

namespace DerpyNewbie.Common.UI
{
[AddComponentMenu("Newbie Commons/UI/Double Click Button")]
[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
public class DoubleClickButton : UdonSharpBehaviour
{
Expand Down
1 change: 1 addition & 0 deletions Packages/dev.derpynewbie.common/Runtime/UI/PopUpImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace DerpyNewbie.Common.UI
{
[AddComponentMenu("Newbie Commons/UI/Pop Up Image")]
[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
public class PopUpImage : UdonSharpBehaviour
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace DerpyNewbie.Common.UI
{
[AddComponentMenu("Newbie Commons/UI/Selection Button")]
public class SelectionButton : UdonSharpBehaviour
{
public Image[] images;
Expand Down
4 changes: 3 additions & 1 deletion Packages/dev.derpynewbie.common/Runtime/UpdateManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

namespace DerpyNewbie.Common
{
[UdonBehaviourSyncMode(BehaviourSyncMode.None)] [DefaultExecutionOrder(-100000)]
[AddComponentMenu("Newbie Commons/Utils/UpdateManager")]
[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
[DefaultExecutionOrder(-100000)]
public class UpdateManager : UdonSharpBehaviour
{
private const int InitialPoolSize = 256;
Expand Down

0 comments on commit e039956

Please sign in to comment.