diff --git a/Assets/Scripts/Behaviours/Vehicles/VehicleAPI.cs b/Assets/Scripts/Behaviours/Vehicles/VehicleAPI.cs index 06e9b7e4..caa4d278 100644 --- a/Assets/Scripts/Behaviours/Vehicles/VehicleAPI.cs +++ b/Assets/Scripts/Behaviours/Vehicles/VehicleAPI.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using UGameCore.Utilities; using UnityEngine; namespace SanAndreasUnity.Behaviours.Vehicles diff --git a/Assets/Scripts/Behaviours/Vehicles/Vehicle_Spawning.cs b/Assets/Scripts/Behaviours/Vehicles/Vehicle_Spawning.cs index 0d68e320..ddc57ba3 100644 --- a/Assets/Scripts/Behaviours/Vehicles/Vehicle_Spawning.cs +++ b/Assets/Scripts/Behaviours/Vehicles/Vehicle_Spawning.cs @@ -544,7 +544,7 @@ namespace SanAndreasUnity.Behaviours.Vehicles */ - gameObject.SetLayerRecursive(Layer); + UGameCore.Utilities.GameObjectExtensions.SetLayerRecursive(gameObject, Layer); SetupHighDetailMesh(); diff --git a/Assets/Scripts/Facepunch.meta b/Assets/Scripts/Facepunch.meta deleted file mode 100644 index 502eeecd..00000000 --- a/Assets/Scripts/Facepunch.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 7f1bad01d36c7d64991e55dbf48d4ff5 -folderAsset: yes -timeCreated: 1428847605 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Facepunch/.gitignore b/Assets/Scripts/Facepunch/.gitignore deleted file mode 100644 index ac472943..00000000 --- a/Assets/Scripts/Facepunch/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -*.* - -!*.cs -!*.cs.meta -!Plugins/*.* -!.* - -Library/ -Build/ -Unity/ -Assets/ -Temp/ -obj/ diff --git a/Assets/Scripts/Facepunch/LICENSE b/Assets/Scripts/Facepunch/LICENSE deleted file mode 100644 index 04825eca..00000000 --- a/Assets/Scripts/Facepunch/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Facepunch Studios LTD - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/Assets/Scripts/Facepunch/Utilities/TransformEx.cs b/Assets/Scripts/Facepunch/Utilities/TransformEx.cs deleted file mode 100644 index 225dce22..00000000 --- a/Assets/Scripts/Facepunch/Utilities/TransformEx.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System.Collections.Generic; -using System.Linq; - -namespace UnityEngine -{ - public static class TransformEx - { - public static Transform FindChildRecursive(this Transform transform, string strName) - { - if (transform.name.Equals(strName, System.StringComparison.InvariantCultureIgnoreCase)) return transform; - - for (int i = 0; i < transform.childCount; i++) - { - var tran = transform.GetChild(i).FindChildRecursive(strName); - if (tran) return tran; - } - - return null; - } - - public static void SetLayerRecursive(this GameObject go, int Layer) - { - go.layer = Layer; - - for (int i = 0; i < go.transform.childCount; i++) - { - go.transform.GetChild(i).gameObject.SetLayerRecursive(Layer); - } - } - - public static void SetLayerRecursive(this GameObject go, string layer) - { - var layerint = LayerMask.NameToLayer(layer); - if (layerint == 0) - { - Debug.LogWarning("SetLayerRecursive: couldn't find layer: " + layer); - return; - } - - go.SetLayerRecursive(layerint); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/Facepunch/Utilities/TransformEx.cs.meta b/Assets/Scripts/Facepunch/Utilities/TransformEx.cs.meta deleted file mode 100644 index e8a82268..00000000 --- a/Assets/Scripts/Facepunch/Utilities/TransformEx.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 31b6ea94cb9db17428839a1c4d7ce124 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 8100 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/UGameCoreUtilities b/Assets/UGameCoreUtilities index a4a8d701..f2ed4500 160000 --- a/Assets/UGameCoreUtilities +++ b/Assets/UGameCoreUtilities @@ -1 +1 @@ -Subproject commit a4a8d70135f8a0f6ba3296fd790bba5cfbffcbb1 +Subproject commit f2ed4500c5bd1ecbe89dc3d3998d660b6b010af1