上传YomovSDK
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
#region License
|
||||
// The MIT License (MIT)
|
||||
//
|
||||
// Copyright (c) 2020 Wanzyee Studio
|
||||
//
|
||||
// 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.
|
||||
#endregion
|
||||
|
||||
using Newtonsoft.Json.UnityConverters.Helpers;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Newtonsoft.Json.UnityConverters.Geometry
|
||||
{
|
||||
/// <summary>
|
||||
/// Custom Newtonsoft.Json converter <see cref="JsonConverter"/> for the Unity Bounds type <see cref="Bounds"/>.
|
||||
/// </summary>
|
||||
public class BoundsConverter : PartialConverter<Bounds>
|
||||
{
|
||||
protected override void ReadValue(ref Bounds value, string name, JsonReader reader, JsonSerializer serializer)
|
||||
{
|
||||
switch (name)
|
||||
{
|
||||
case nameof(value.center):
|
||||
value.center = reader.ReadViaSerializer<Vector3>(serializer);
|
||||
break;
|
||||
case nameof(value.size):
|
||||
value.size = reader.ReadViaSerializer<Vector3>(serializer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void WriteJsonProperties(JsonWriter writer, Bounds value, JsonSerializer serializer)
|
||||
{
|
||||
writer.WritePropertyName(nameof(value.center));
|
||||
serializer.Serialize(writer, value.center, typeof(Vector3));
|
||||
writer.WritePropertyName(nameof(value.size));
|
||||
serializer.Serialize(writer, value.size, typeof(Vector3));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0d2729e9ff28c004bbda58b6ecffe053
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,58 @@
|
||||
#region License
|
||||
// The MIT License (MIT)
|
||||
//
|
||||
// Copyright (c) 2020 Wanzyee Studio
|
||||
//
|
||||
// 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.
|
||||
#endregion
|
||||
|
||||
using Newtonsoft.Json.UnityConverters.Helpers;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Scripting;
|
||||
|
||||
namespace Newtonsoft.Json.UnityConverters.Geometry
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
/// Custom Newtonsoft.Json converter <see cref="JsonConverter"/> for the Unity integer Bounds type <see cref="BoundsInt"/>.
|
||||
/// </summary>
|
||||
public class BoundsIntConverter : PartialConverter<BoundsInt>
|
||||
{
|
||||
protected override void ReadValue(ref BoundsInt value, string name, JsonReader reader, JsonSerializer serializer)
|
||||
{
|
||||
switch (name)
|
||||
{
|
||||
case nameof(value.position):
|
||||
value.position = reader.ReadViaSerializer<Vector3Int>(serializer);
|
||||
break;
|
||||
case nameof(value.size):
|
||||
value.size = reader.ReadViaSerializer<Vector3Int>(serializer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void WriteJsonProperties(JsonWriter writer, BoundsInt value, JsonSerializer serializer)
|
||||
{
|
||||
writer.WritePropertyName(nameof(value.position));
|
||||
serializer.Serialize(writer, value.position, typeof(Vector3Int));
|
||||
writer.WritePropertyName(nameof(value.size));
|
||||
serializer.Serialize(writer, value.size, typeof(Vector3Int));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5463600b4a29b4746a12c3f686329b0e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,29 @@
|
||||
using Newtonsoft.Json.UnityConverters.Helpers;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Newtonsoft.Json.UnityConverters.Geometry
|
||||
{
|
||||
public class PlaneConverter : PartialConverter<Plane>
|
||||
{
|
||||
protected override void ReadValue(ref Plane value, string name, JsonReader reader, JsonSerializer serializer)
|
||||
{
|
||||
switch (name)
|
||||
{
|
||||
case nameof(value.normal):
|
||||
value.normal = reader.ReadViaSerializer<Vector3>(serializer);
|
||||
break;
|
||||
case nameof(value.distance):
|
||||
value.distance = reader.ReadAsFloat() ?? 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void WriteJsonProperties(JsonWriter writer, Plane value, JsonSerializer serializer)
|
||||
{
|
||||
writer.WritePropertyName(nameof(value.normal));
|
||||
serializer.Serialize(writer, value.normal, typeof(Vector3));
|
||||
writer.WritePropertyName(nameof(value.distance));
|
||||
writer.WriteValue(value.distance);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d4b26647e991900499216051e41994df
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,66 @@
|
||||
#region License
|
||||
// The MIT License (MIT)
|
||||
//
|
||||
// Copyright (c) 2020 Wanzyee Studio
|
||||
//
|
||||
// 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.
|
||||
#endregion
|
||||
|
||||
using Newtonsoft.Json.UnityConverters.Helpers;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Newtonsoft.Json.UnityConverters.Geometry
|
||||
{
|
||||
/// <summary>
|
||||
/// Custom Newtonsoft.Json converter <see cref="JsonConverter"/> for the Unity Rect type <see cref="Rect"/>.
|
||||
/// </summary>
|
||||
public class RectConverter : PartialConverter<Rect>
|
||||
{
|
||||
protected override void ReadValue(ref Rect value, string name, JsonReader reader, JsonSerializer serializer)
|
||||
{
|
||||
switch (name)
|
||||
{
|
||||
case nameof(value.x):
|
||||
value.x = reader.ReadAsFloat() ?? 0;
|
||||
break;
|
||||
case nameof(value.y):
|
||||
value.y = reader.ReadAsFloat() ?? 0;
|
||||
break;
|
||||
case nameof(value.width):
|
||||
value.width = reader.ReadAsFloat() ?? 0;
|
||||
break;
|
||||
case nameof(value.height):
|
||||
value.height = reader.ReadAsFloat() ?? 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void WriteJsonProperties(JsonWriter writer, Rect value, JsonSerializer serializer)
|
||||
{
|
||||
writer.WritePropertyName(nameof(value.x));
|
||||
writer.WriteValue(value.x);
|
||||
writer.WritePropertyName(nameof(value.y));
|
||||
writer.WriteValue(value.y);
|
||||
writer.WritePropertyName(nameof(value.width));
|
||||
writer.WriteValue(value.width);
|
||||
writer.WritePropertyName(nameof(value.height));
|
||||
writer.WriteValue(value.height);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fbec5ae23d2fad244a30539e92987dd6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,65 @@
|
||||
#region License
|
||||
// The MIT License (MIT)
|
||||
//
|
||||
// Copyright (c) 2020 Wanzyee Studio
|
||||
//
|
||||
// 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.
|
||||
#endregion
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace Newtonsoft.Json.UnityConverters.Geometry
|
||||
{
|
||||
/// <summary>
|
||||
/// Custom Newtonsoft.Json converter <see cref="JsonConverter"/> for the Unity RectInt type <see cref="RectInt"/>.
|
||||
/// </summary>
|
||||
public class RectIntConverter : PartialConverter<RectInt>
|
||||
{
|
||||
protected override void ReadValue(ref RectInt value, string name, JsonReader reader, JsonSerializer serializer)
|
||||
{
|
||||
switch (name)
|
||||
{
|
||||
case nameof(value.x):
|
||||
value.x = reader.ReadAsInt32() ?? 0;
|
||||
break;
|
||||
case nameof(value.y):
|
||||
value.y = reader.ReadAsInt32() ?? 0;
|
||||
break;
|
||||
case nameof(value.width):
|
||||
value.width = reader.ReadAsInt32() ?? 0;
|
||||
break;
|
||||
case nameof(value.height):
|
||||
value.height = reader.ReadAsInt32() ?? 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void WriteJsonProperties(JsonWriter writer, RectInt value, JsonSerializer serializer)
|
||||
{
|
||||
writer.WritePropertyName(nameof(value.x));
|
||||
writer.WriteValue(value.x);
|
||||
writer.WritePropertyName(nameof(value.y));
|
||||
writer.WriteValue(value.y);
|
||||
writer.WritePropertyName(nameof(value.width));
|
||||
writer.WriteValue(value.width);
|
||||
writer.WritePropertyName(nameof(value.height));
|
||||
writer.WriteValue(value.height);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 155a28c5745d7b5478f93f445facaf01
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,65 @@
|
||||
#region License
|
||||
// The MIT License (MIT)
|
||||
//
|
||||
// Copyright (c) 2020 Wanzyee Studio
|
||||
//
|
||||
// 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.
|
||||
#endregion
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace Newtonsoft.Json.UnityConverters.Geometry
|
||||
{
|
||||
/// <summary>
|
||||
/// Custom Newtonsoft.Json converter <see cref="JsonConverter"/> for the Unity RectOffset type <see cref="RectOffset"/>.
|
||||
/// </summary>
|
||||
public class RectOffsetConverter : PartialConverter<RectOffset>
|
||||
{
|
||||
protected override void ReadValue(ref RectOffset value, string name, JsonReader reader, JsonSerializer serializer)
|
||||
{
|
||||
switch (name)
|
||||
{
|
||||
case nameof(value.left):
|
||||
value.left = reader.ReadAsInt32() ?? 0;
|
||||
break;
|
||||
case nameof(value.right):
|
||||
value.right = reader.ReadAsInt32() ?? 0;
|
||||
break;
|
||||
case nameof(value.top):
|
||||
value.top = reader.ReadAsInt32() ?? 0;
|
||||
break;
|
||||
case nameof(value.bottom):
|
||||
value.bottom = reader.ReadAsInt32() ?? 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void WriteJsonProperties(JsonWriter writer, RectOffset value, JsonSerializer serializer)
|
||||
{
|
||||
writer.WritePropertyName(nameof(value.left));
|
||||
writer.WriteValue(value.left);
|
||||
writer.WritePropertyName(nameof(value.right));
|
||||
writer.WriteValue(value.right);
|
||||
writer.WritePropertyName(nameof(value.top));
|
||||
writer.WriteValue(value.top);
|
||||
writer.WritePropertyName(nameof(value.bottom));
|
||||
writer.WriteValue(value.bottom);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3a20aa434de15584a84137fea1e06814
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user