Skip to content

Commit

Permalink
longer package namespace to reduce collisions
Browse files Browse the repository at this point in the history
  • Loading branch information
leon-arndt committed Sep 9, 2022
1 parent 814317a commit 34f31a6
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ButtonExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using UnityEngine.Events;
using UnityEngine.UI;

namespace Extensions
namespace ErgonomicExtensions
{
public static class ButtonExtensions
{
Expand Down
7 changes: 6 additions & 1 deletion GameObjectExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using UnityEngine;

namespace Extensions
namespace ErgonomicExtensions
{
public static class GameObjectExtensions
{
Expand All @@ -13,5 +13,10 @@ public static void Deactivate(this GameObject gameObject)
{
gameObject.SetActive(false);
}

public static void ToggleActive(this GameObject gameObject)
{
gameObject.SetActive(!gameObject.activeSelf);
}
}
}
2 changes: 1 addition & 1 deletion MonoBehaviourExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using UnityEngine;

namespace Extensions
namespace ErgonomicExtensions
{
public static class MonoBehaviourExtensions
{
Expand Down
16 changes: 16 additions & 0 deletions Vector3Extensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using UnityEngine;

namespace ErgonomicExtensions
{
public static class Vector3Extensions
{
public static Vector3 Round(this Vector3 input)
{
return new Vector3(
Mathf.Round(input.x),
Mathf.Round(input.y),
Mathf.Round(input.z)
);
}
}
}
3 changes: 3 additions & 0 deletions Vector3Extensions.cs.meta

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.larndt.ergonomic-extensions",
"version": "0.1.0",
"version": "0.1.1",
"displayName": "Ergonomic Unity Extensions",
"description": "Missing extension methods for Unity components",
"unity": "2019.1",
Expand Down

0 comments on commit 34f31a6

Please sign in to comment.