Skip to content

Commit 803c9cf

Browse files
committed
Updating core package
1 parent 29d2b23 commit 803c9cf

File tree

97 files changed

+81
-51
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+81
-51
lines changed

Core.meta

-3
This file was deleted.

ElasticSea.meta

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ElasticSea/Framework.meta

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Core/Scripts.meta renamed to ElasticSea/Framework/Scripts.meta

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Core/Scripts/Extensions/BoundsExtensions.cs renamed to ElasticSea/Framework/Scripts/Extensions/BoundsExtensions.cs

+21-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.Linq;
44
using UnityEngine;
55

6-
namespace Core.Extensions
6+
namespace ElasticSea.Framework.Extensions
77
{
88
public static class BoundsExtensions
99
{
@@ -182,5 +182,25 @@ public static Bounds MoveToBottom(this Bounds from, Bounds to)
182182
var newCenter = from.center.SetY(to.min.y + from.extents.y);
183183
return new Bounds(newCenter, from.size);
184184
}
185+
186+
public static Rect ToRect(this IEnumerable<Vector2> vertices)
187+
{
188+
return vertices.ToArray().ToRect();
189+
}
190+
191+
public static Rect ToRect(this Vector2[] vertices)
192+
{
193+
var min = vertices[0];
194+
var max = vertices[1];
195+
196+
for (var i = 0; i < vertices.Length; i++)
197+
{
198+
var current = vertices[i];
199+
min = min.Min(current);
200+
max = max.Max(current);
201+
}
202+
203+
return Rect.MinMaxRect(min.x, min.y, max.x, max.y);
204+
}
185205
}
186206
}

Core/Scripts/Extensions/ComponentExtensions.cs renamed to ElasticSea/Framework/Scripts/Extensions/ComponentExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using UnityEngine;
33

4-
namespace Core.Extensions
4+
namespace ElasticSea.Framework.Extensions
55
{
66
public static class ComponentExtensions
77
{

Core/Scripts/Extensions/ExceptionExtensions.cs renamed to ElasticSea/Framework/Scripts/Extensions/ExceptionExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33

4-
namespace _Framework.Core.Scripts.Extensions
4+
namespace ElasticSea.Framework.Extensions
55
{
66
public static class ExceptionExtensions
77
{

Core/Scripts/Extensions/GameObjectExtensions.cs renamed to ElasticSea/Framework/Scripts/Extensions/GameObjectExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
using UnityEngine.EventSystems;
99
using UnityObject = UnityEngine.Object;
1010

11-
namespace Core.Extensions
11+
namespace ElasticSea.Framework.Extensions
1212
{
1313
public static class GameObjectExtensions
1414
{

Core/Scripts/Extensions/GenericEnumerableExtensions.cs renamed to ElasticSea/Framework/Scripts/Extensions/GenericEnumerableExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.Linq;
44
using System.Text.RegularExpressions;
55

6-
namespace Core.Extensions
6+
namespace ElasticSea.Framework.Extensions
77
{
88
public static class GenericEnumerableExtensions
99
{

Core/Scripts/Extensions/KeyValuePairExtensions.cs renamed to ElasticSea/Framework/Scripts/Extensions/KeyValuePairExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System.Collections.Generic;
22

3-
namespace Core.Scripts.Extensions
3+
namespace ElasticSea.Framework.Extensions
44
{
55
public static class KeyValuePairExtensions
66
{

Core/Scripts/Extensions/MaterialExtensions.cs renamed to ElasticSea/Framework/Scripts/Extensions/MaterialExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using UnityEngine;
22
using UnityEngine.Rendering;
33

4-
namespace Core.Extensions
4+
namespace ElasticSea.Framework.Extensions
55
{
66
public static class MaterialExtensions
77
{

Core/Scripts/Extensions/MeshExtensions.cs renamed to ElasticSea/Framework/Scripts/Extensions/MeshExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using UnityEngine;
22

3-
namespace Packages.Core.Scripts.Extensions
3+
namespace ElasticSea.Framework.Extensions
44
{
55
public static class MeshExtensions
66
{

Core/Scripts/Extensions/RectTransformExtensions.cs renamed to ElasticSea/Framework/Scripts/Extensions/RectTransformExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using UnityEngine;
22

3-
namespace Core.Extensions
3+
namespace ElasticSea.Framework.Extensions
44
{
55
public static class RectTransformExtensions
66
{

Core/Scripts/Extensions/StringExtensions.cs renamed to ElasticSea/Framework/Scripts/Extensions/StringExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using System.Text.RegularExpressions;
77
using System.Threading;
88

9-
namespace Core.Extensions
9+
namespace ElasticSea.Framework.Extensions
1010
{
1111
public static class StringExtensions
1212
{

Core/Scripts/Extensions/TransformExtensions.cs renamed to ElasticSea/Framework/Scripts/Extensions/TransformExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using UnityEngine;
22

3-
namespace Core.Extensions
3+
namespace ElasticSea.Framework.Extensions
44
{
55
public static class TransformExtensions
66
{

Core/Scripts/Extensions/VectorExtensions.cs renamed to ElasticSea/Framework/Scripts/Extensions/VectorExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Linq;
33
using UnityEngine;
44

5-
namespace Core.Extensions
5+
namespace ElasticSea.Framework.Extensions
66
{
77
public static class VectorExtensions
88
{
File renamed without changes.

Core/Scripts/Util/ByteArrayComparer.cs renamed to ElasticSea/Framework/Scripts/Util/ByteArrayComparer.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
using System;
22
using System.Collections.Generic;
3-
using System.Linq;
43

5-
namespace Core.Util
4+
namespace ElasticSea.Framework.Util
65
{
76
public class ByteArrayComparer : EqualityComparer<byte[]>
87
{

Core/Scripts/Util/ByteUtils.cs renamed to ElasticSea/Framework/Scripts/Util/ByteUtils.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
using System;
22
using UnityEngine;
3-
using static _Framework.Scripts.Util.Conversions.EndianBitConverter;
3+
using static ElasticSea.Framework.Util.Conversions.EndianBitConverter;
44

5-
namespace Core.Util
5+
namespace ElasticSea.Framework.Util
66
{
77
public static class ByteUtils
88
{

Core/Scripts/Util/Callbacks/CollisionCallback.cs renamed to ElasticSea/Framework/Scripts/Util/Callbacks/CollisionCallback.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using UnityEngine;
22

3-
namespace Core.Util.Callbacks
3+
namespace ElasticSea.Framework.Util.Callbacks
44
{
55
public class CollisionCallback : MonoBehaviour
66
{

Core/Scripts/Util/Callbacks/OnDestroyCallback.cs renamed to ElasticSea/Framework/Scripts/Util/Callbacks/OnDestroyCallback.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using UnityEngine;
33

4-
namespace Core.Util.Callbacks
4+
namespace ElasticSea.Framework.Util.Callbacks
55
{
66
public class OnDestroyCallback : MonoBehaviour
77
{

Core/Scripts/Util/Callbacks/OnDragCallback.cs renamed to ElasticSea/Framework/Scripts/Util/Callbacks/OnDragCallback.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using UnityEngine;
33
using UnityEngine.EventSystems;
44

5-
namespace Core.Util.Callbacks
5+
namespace ElasticSea.Framework.Util.Callbacks
66
{
77
public class OnDragCallback : MonoBehaviour, IDragHandler
88
{

Core/Scripts/Util/Callbacks/OnPointerClickCallback.cs renamed to ElasticSea/Framework/Scripts/Util/Callbacks/OnPointerClickCallback.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using UnityEngine;
33
using UnityEngine.EventSystems;
44

5-
namespace Core.Util.Callbacks
5+
namespace ElasticSea.Framework.Util.Callbacks
66
{
77
public class OnPointerClickCallback : MonoBehaviour, IPointerClickHandler
88
{

Core/Scripts/Util/Callbacks/OnPointerDownCallback.cs renamed to ElasticSea/Framework/Scripts/Util/Callbacks/OnPointerDownCallback.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using UnityEngine;
33
using UnityEngine.EventSystems;
44

5-
namespace Core.Util.Callbacks
5+
namespace ElasticSea.Framework.Util.Callbacks
66
{
77
public class OnPointerDownCallback : MonoBehaviour, IPointerDownHandler
88
{

Core/Scripts/Util/Callbacks/OnPointerEnterCallback.cs renamed to ElasticSea/Framework/Scripts/Util/Callbacks/OnPointerEnterCallback.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using UnityEngine;
33
using UnityEngine.EventSystems;
44

5-
namespace Core.Util.Callbacks
5+
namespace ElasticSea.Framework.Util.Callbacks
66
{
77
public class OnPointerEnterCallback : MonoBehaviour, IPointerEnterHandler
88
{

Core/Scripts/Util/Callbacks/OnPointerExitCallback.cs renamed to ElasticSea/Framework/Scripts/Util/Callbacks/OnPointerExitCallback.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using UnityEngine;
33
using UnityEngine.EventSystems;
44

5-
namespace Core.Util.Callbacks
5+
namespace ElasticSea.Framework.Util.Callbacks
66
{
77
public class OnPointerExitCallback : MonoBehaviour, IPointerExitHandler
88
{

Core/Scripts/Util/Callbacks/OnPointerUpCallback.cs renamed to ElasticSea/Framework/Scripts/Util/Callbacks/OnPointerUpCallback.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using UnityEngine;
33
using UnityEngine.EventSystems;
44

5-
namespace Core.Util.Callbacks
5+
namespace ElasticSea.Framework.Util.Callbacks
66
{
77
public class OnPointerUpCallback : MonoBehaviour, IPointerUpHandler
88
{

Core/Scripts/Util/Callbacks/TriggerCallback.cs renamed to ElasticSea/Framework/Scripts/Util/Callbacks/TriggerCallback.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using UnityEngine;
22

3-
namespace Core.Util.Callbacks
3+
namespace ElasticSea.Framework.Util.Callbacks
44
{
55
public class TriggerCallback : MonoBehaviour
66
{

Core/Scripts/Util/Conversions/BigEndianBitConverter.cs renamed to ElasticSea/Framework/Scripts/Util/Conversions/BigEndianBitConverter.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace _Framework.Scripts.Util.Conversions
1+
namespace ElasticSea.Framework.Util.Conversions
22
{
33
/// <summary>
44
/// Implementation of EndianBitConverter which converts to/from big-endian

Core/Scripts/Util/Conversions/DoubleConverter.cs renamed to ElasticSea/Framework/Scripts/Util/Conversions/DoubleConverter.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using System.Globalization;
33

4-
namespace _Framework.Scripts.Util.Conversions
4+
namespace ElasticSea.Framework.Util.Conversions
55
{
66
/// <summary>
77
/// A class to allow the conversion of doubles to string representations of

Core/Scripts/Util/Conversions/EndianBitConverter.cs renamed to ElasticSea/Framework/Scripts/Util/Conversions/EndianBitConverter.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using System.Runtime.InteropServices;
33

4-
namespace _Framework.Scripts.Util.Conversions
4+
namespace ElasticSea.Framework.Util.Conversions
55
{
66
/// <summary>
77
/// Equivalent of System.BitConverter, but with either endianness.

Core/Scripts/Util/Conversions/Endianness.cs renamed to ElasticSea/Framework/Scripts/Util/Conversions/Endianness.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace _Framework.Scripts.Util.Conversions
1+
namespace ElasticSea.Framework.Util.Conversions
22
{
33
/// <summary>
44
/// Endianness of a converter

Core/Scripts/Util/Conversions/LittleEndianBitConverter.cs renamed to ElasticSea/Framework/Scripts/Util/Conversions/LittleEndianBitConverter.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace _Framework.Scripts.Util.Conversions
1+
namespace ElasticSea.Framework.Util.Conversions
22
{
33
/// <summary>
44
/// Implementation of EndianBitConverter which converts to/from little-endian

Core/Scripts/Util/Editor/QuickActions.cs renamed to ElasticSea/Framework/Scripts/Util/Editor/QuickActions.cs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
using System.IO;
2-
using Core.Extensions;
3-
using Core.Util;
42
using UnityEditor;
53
using UnityEngine;
64

7-
namespace Core.Util
5+
namespace ElasticSea.Framework.Util.Editor
86
{
97
public class QuickActions : EditorWindow
108
{

Core/Scripts/Util/Editor/SceneList.cs renamed to ElasticSea/Framework/Scripts/Util/Editor/SceneList.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using UnityEditor.SceneManagement;
66
using UnityEngine;
77

8-
namespace Core.Util
8+
namespace ElasticSea.Framework.Util.Editor
99
{
1010
public class SceneList : EditorWindow
1111
{

Core/Scripts/Util/EnumUtils.cs renamed to ElasticSea/Framework/Scripts/Util/EnumUtils.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
22

3-
namespace Core
3+
namespace ElasticSea.Framework.Util
44
{
55
public class EnumUtils<T> where T : Enum
66
{

Core/Scripts/Util/GizmoUtils.cs renamed to ElasticSea/Framework/Scripts/Util/GizmoUtils.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Linq;
33
using UnityEngine;
44

5-
namespace Core.Util
5+
namespace ElasticSea.Framework.Util
66
{
77
public class GizmoUtils
88
{

Core/Scripts/Util/MeshSerializer.cs renamed to ElasticSea/Framework/Scripts/Util/MeshSerializer.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
using System.Linq;
4343
using UnityEngine;
4444

45-
namespace Core.Util
45+
namespace ElasticSea.Framework.Util
4646
{
4747
public static class MeshSerializer
4848
{

Core/Scripts/Util/Pool.cs renamed to ElasticSea/Framework/Scripts/Util/Pool.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33

4-
namespace Core.Util
4+
namespace ElasticSea.Framework.Util
55
{
66
public class Pool<T>
77
{

Core/Scripts/Util/PropertyDrawers/CustomObjectPickerAttribute.cs renamed to ElasticSea/Framework/Scripts/Util/PropertyDrawers/CustomObjectPickerAttribute.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using UnityEngine;
22

3-
namespace Core.Util.PropertyDrawers
3+
namespace ElasticSea.Framework.Util.PropertyDrawers
44
{
55
[System.AttributeUsage(System.AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
66
public class CustomObjectPickerAttribute : PropertyAttribute

Core/Scripts/Util/PropertyDrawers/Editor/CustomObjectPickerEditorWindow.cs renamed to ElasticSea/Framework/Scripts/Util/PropertyDrawers/Editor/CustomObjectPickerEditorWindow.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using UnityEditor;
44
using UnityEngine;
55

6-
namespace Core.Util.PropertyDrawers
6+
namespace ElasticSea.Framework.Util.PropertyDrawers.Editor
77
{
88
public class CustomObjectPickerEditorWindow : EditorWindow
99
{

Core/Scripts/Util/PropertyDrawers/Editor/CustomObjectPickerPropertyDrawer.cs renamed to ElasticSea/Framework/Scripts/Util/PropertyDrawers/Editor/CustomObjectPickerPropertyDrawer.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using UnityEditor;
55
using UnityEngine;
66

7-
namespace Core.Util.PropertyDrawers
7+
namespace ElasticSea.Framework.Util.PropertyDrawers.Editor
88
{
99
using Object = UnityEngine.Object;
1010

Core/Scripts/Util/Range.cs renamed to ElasticSea/Framework/Scripts/Util/Range.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace Core.Util
1+
namespace ElasticSea.Framework.Util
22
{
33
public class Range
44
{

Core/Scripts/Util/SceneSingleton.cs renamed to ElasticSea/Framework/Scripts/Util/SceneSingleton.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using UnityEngine;
22

3-
namespace Core.Util
3+
namespace ElasticSea.Framework.Util
44
{
55
// Just like regular singleton, but we don't call DontDestroyOnLoad and free the instance on OnDestroy
66
public abstract class SceneSingleton<T> : MonoBehaviour where T : SceneSingleton<T>

0 commit comments

Comments
 (0)