네임스페이스 수정
This commit is contained in:
@@ -10,16 +10,16 @@ public class CustomMessagePackResolver : IFormatterResolver
|
||||
|
||||
private static readonly Dictionary<Type, object> formatters = new Dictionary<Type, object>
|
||||
{
|
||||
{ typeof(Studio.Manage.MaterialPropertyData), new MessagePack.Formatters.XED.Manage.MaterialPropertyDataFormatter() },
|
||||
{ typeof(Studio.Manage.ModelData), new MessagePack.Formatters.XED.Manage.ModelDataFormatter() },
|
||||
{ typeof(Studio.Manage.SaveData), new MessagePack.Formatters.XED.Manage.SaveDataFormatter() },
|
||||
{ typeof(Studio.Manage.SavedModelData), new MessagePack.Formatters.XED.Manage.SavedModelDataFormatter() },
|
||||
{ typeof(Studio.AssetTool.MaterialPropertyData), new MessagePack.Formatters.XED.Manage.MaterialPropertyDataFormatter() },
|
||||
{ typeof(Studio.AssetTool.ModelData), new MessagePack.Formatters.XED.Manage.ModelDataFormatter() },
|
||||
{ typeof(Studio.AssetTool.SaveData), new MessagePack.Formatters.XED.Manage.SaveDataFormatter() },
|
||||
{ typeof(Studio.AssetTool.SavedModelData), new MessagePack.Formatters.XED.Manage.SavedModelDataFormatter() },
|
||||
{ typeof(Studio.Manage.SerializableMesh), new MessagePack.Formatters.XED.Manage.SerializableMeshFormatter() },
|
||||
{ typeof(Studio.Manage.SerializableQuaternion), new MessagePack.Formatters.XED.Manage.SerializableQuaternionFormatter() },
|
||||
{ typeof(Studio.Manage.SerializableVector2), new MessagePack.Formatters.XED.Manage.SerializableVector2Formatter() },
|
||||
{ typeof(Studio.Manage.SerializableVector3), new MessagePack.Formatters.XED.Manage.SerializableVector3Formatter() },
|
||||
{ typeof(Studio.Manage.SubmeshData), new MessagePack.Formatters.XED.Manage.SubmeshDataFormatter() },
|
||||
{ typeof(Studio.Manage.TextureData), new MessagePack.Formatters.XED.Manage.TextureDataFormatter() },
|
||||
{ typeof(Studio.AssetTool.TextureData), new MessagePack.Formatters.XED.Manage.TextureDataFormatter() },
|
||||
{ typeof(Studio.Manage.TransformData), new MessagePack.Formatters.XED.Manage.TransformDataFormatter() },
|
||||
};
|
||||
|
||||
|
||||
@@ -49,28 +49,28 @@ namespace MessagePack.Resolvers
|
||||
{
|
||||
lookup = new global::System.Collections.Generic.Dictionary<global::System.Type, int>(23)
|
||||
{
|
||||
{ typeof(global::Studio.Manage.MaterialPropertyData[]), 0 },
|
||||
{ typeof(global::Studio.Manage.ModelData[]), 1 },
|
||||
{ typeof(global::Studio.Manage.SavedModelData[]), 2 },
|
||||
{ typeof(global::Studio.AssetTool.MaterialPropertyData[]), 0 },
|
||||
{ typeof(global::Studio.AssetTool.ModelData[]), 1 },
|
||||
{ typeof(global::Studio.AssetTool.SavedModelData[]), 2 },
|
||||
{ typeof(global::Studio.Manage.SerializableVector2[]), 3 },
|
||||
{ typeof(global::Studio.Manage.SerializableVector3[]), 4 },
|
||||
{ typeof(global::Studio.Manage.SerializableVector4[]), 5 },
|
||||
{ typeof(global::Studio.Manage.SubmeshData[]), 6 },
|
||||
{ typeof(global::Studio.Manage.TextureData[]), 7 },
|
||||
{ typeof(global::Studio.Manage.ThumbnailData[]), 8 },
|
||||
{ typeof(global::Studio.AssetTool.TextureData[]), 7 },
|
||||
{ typeof(global::Studio.AssetTool.ThumbnailData[]), 8 },
|
||||
{ typeof(string[][]), 9 },
|
||||
{ typeof(global::Studio.Manage.MaterialPropertyData), 10 },
|
||||
{ typeof(global::Studio.Manage.ModelData), 11 },
|
||||
{ typeof(global::Studio.Manage.SaveData), 12 },
|
||||
{ typeof(global::Studio.Manage.SavedModelData), 13 },
|
||||
{ typeof(global::Studio.AssetTool.MaterialPropertyData), 10 },
|
||||
{ typeof(global::Studio.AssetTool.ModelData), 11 },
|
||||
{ typeof(global::Studio.AssetTool.SaveData), 12 },
|
||||
{ typeof(global::Studio.AssetTool.SavedModelData), 13 },
|
||||
{ typeof(global::Studio.Manage.SerializableMesh), 14 },
|
||||
{ typeof(global::Studio.Manage.SerializableQuaternion), 15 },
|
||||
{ typeof(global::Studio.Manage.SerializableVector2), 16 },
|
||||
{ typeof(global::Studio.Manage.SerializableVector3), 17 },
|
||||
{ typeof(global::Studio.Manage.SerializableVector4), 18 },
|
||||
{ typeof(global::Studio.Manage.SubmeshData), 19 },
|
||||
{ typeof(global::Studio.Manage.TextureData), 20 },
|
||||
{ typeof(global::Studio.Manage.ThumbnailData), 21 },
|
||||
{ typeof(global::Studio.AssetTool.TextureData), 20 },
|
||||
{ typeof(global::Studio.AssetTool.ThumbnailData), 21 },
|
||||
{ typeof(global::Studio.Manage.TransformData), 22 },
|
||||
};
|
||||
}
|
||||
@@ -85,15 +85,15 @@ namespace MessagePack.Resolvers
|
||||
|
||||
switch (key)
|
||||
{
|
||||
case 0: return new global::MessagePack.Formatters.ArrayFormatter<global::Studio.Manage.MaterialPropertyData>();
|
||||
case 1: return new global::MessagePack.Formatters.ArrayFormatter<global::Studio.Manage.ModelData>();
|
||||
case 2: return new global::MessagePack.Formatters.ArrayFormatter<global::Studio.Manage.SavedModelData>();
|
||||
case 0: return new global::MessagePack.Formatters.ArrayFormatter<global::Studio.AssetTool.MaterialPropertyData>();
|
||||
case 1: return new global::MessagePack.Formatters.ArrayFormatter<global::Studio.AssetTool.ModelData>();
|
||||
case 2: return new global::MessagePack.Formatters.ArrayFormatter<global::Studio.AssetTool.SavedModelData>();
|
||||
case 3: return new global::MessagePack.Formatters.ArrayFormatter<global::Studio.Manage.SerializableVector2>();
|
||||
case 4: return new global::MessagePack.Formatters.ArrayFormatter<global::Studio.Manage.SerializableVector3>();
|
||||
case 5: return new global::MessagePack.Formatters.ArrayFormatter<global::Studio.Manage.SerializableVector4>();
|
||||
case 6: return new global::MessagePack.Formatters.ArrayFormatter<global::Studio.Manage.SubmeshData>();
|
||||
case 7: return new global::MessagePack.Formatters.ArrayFormatter<global::Studio.Manage.TextureData>();
|
||||
case 8: return new global::MessagePack.Formatters.ArrayFormatter<global::Studio.Manage.ThumbnailData>();
|
||||
case 7: return new global::MessagePack.Formatters.ArrayFormatter<global::Studio.AssetTool.TextureData>();
|
||||
case 8: return new global::MessagePack.Formatters.ArrayFormatter<global::Studio.AssetTool.ThumbnailData>();
|
||||
case 9: return new global::MessagePack.Formatters.ArrayFormatter<string[]>();
|
||||
case 10: return new MessagePack.Formatters.XED.Manage.MaterialPropertyDataFormatter();
|
||||
case 11: return new MessagePack.Formatters.XED.Manage.ModelDataFormatter();
|
||||
@@ -143,10 +143,10 @@ namespace MessagePack.Resolvers
|
||||
|
||||
namespace MessagePack.Formatters.XED.Manage
|
||||
{
|
||||
public sealed class MaterialPropertyDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::Studio.Manage.MaterialPropertyData>
|
||||
public sealed class MaterialPropertyDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::Studio.AssetTool.MaterialPropertyData>
|
||||
{
|
||||
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::Studio.Manage.MaterialPropertyData value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::Studio.AssetTool.MaterialPropertyData value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
@@ -169,7 +169,7 @@ namespace MessagePack.Formatters.XED.Manage
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string[]>(formatterResolver).Serialize(ref writer, value.texUIDs, options);
|
||||
}
|
||||
|
||||
public global::Studio.Manage.MaterialPropertyData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public global::Studio.AssetTool.MaterialPropertyData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (reader.TryReadNil())
|
||||
{
|
||||
@@ -179,7 +179,7 @@ namespace MessagePack.Formatters.XED.Manage
|
||||
options.Security.DepthStep(ref reader);
|
||||
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
|
||||
var length = reader.ReadArrayHeader();
|
||||
var ____result = new global::Studio.Manage.MaterialPropertyData();
|
||||
var ____result = new global::Studio.AssetTool.MaterialPropertyData();
|
||||
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
@@ -229,10 +229,10 @@ namespace MessagePack.Formatters.XED.Manage
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ModelDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::Studio.Manage.ModelData>
|
||||
public sealed class ModelDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::Studio.AssetTool.ModelData>
|
||||
{
|
||||
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::Studio.Manage.ModelData value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::Studio.AssetTool.ModelData value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
@@ -247,10 +247,10 @@ namespace MessagePack.Formatters.XED.Manage
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Serialize(ref writer, value.modelComponentName, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::Studio.Manage.TransformData>(formatterResolver).Serialize(ref writer, value.transformData, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::Studio.Manage.SerializableMesh>(formatterResolver).Serialize(ref writer, value.mesh, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::Studio.Manage.MaterialPropertyData[]>(formatterResolver).Serialize(ref writer, value.materialProperties, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::Studio.AssetTool.MaterialPropertyData[]>(formatterResolver).Serialize(ref writer, value.materialProperties, options);
|
||||
}
|
||||
|
||||
public global::Studio.Manage.ModelData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public global::Studio.AssetTool.ModelData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (reader.TryReadNil())
|
||||
{
|
||||
@@ -260,7 +260,7 @@ namespace MessagePack.Formatters.XED.Manage
|
||||
options.Security.DepthStep(ref reader);
|
||||
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
|
||||
var length = reader.ReadArrayHeader();
|
||||
var ____result = new global::Studio.Manage.ModelData();
|
||||
var ____result = new global::Studio.AssetTool.ModelData();
|
||||
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
@@ -282,7 +282,7 @@ namespace MessagePack.Formatters.XED.Manage
|
||||
____result.mesh = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::Studio.Manage.SerializableMesh>(formatterResolver).Deserialize(ref reader, options);
|
||||
break;
|
||||
case 5:
|
||||
____result.materialProperties = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::Studio.Manage.MaterialPropertyData[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
____result.materialProperties = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::Studio.AssetTool.MaterialPropertyData[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
break;
|
||||
default:
|
||||
reader.Skip();
|
||||
@@ -295,10 +295,10 @@ namespace MessagePack.Formatters.XED.Manage
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class SaveDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::Studio.Manage.SaveData>
|
||||
public sealed class SaveDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::Studio.AssetTool.SaveData>
|
||||
{
|
||||
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::Studio.Manage.SaveData value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::Studio.AssetTool.SaveData value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
@@ -308,12 +308,12 @@ namespace MessagePack.Formatters.XED.Manage
|
||||
|
||||
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
|
||||
writer.WriteArrayHeader(3);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::Studio.Manage.SavedModelData[]>(formatterResolver).Serialize(ref writer, value.modelDatas, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::Studio.Manage.TextureData[]>(formatterResolver).Serialize(ref writer, value.textureDatas, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::Studio.Manage.ThumbnailData[]>(formatterResolver).Serialize(ref writer, value.thumbnailDatas, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::Studio.AssetTool.SavedModelData[]>(formatterResolver).Serialize(ref writer, value.modelDatas, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::Studio.AssetTool.TextureData[]>(formatterResolver).Serialize(ref writer, value.textureDatas, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::Studio.AssetTool.ThumbnailData[]>(formatterResolver).Serialize(ref writer, value.thumbnailDatas, options);
|
||||
}
|
||||
|
||||
public global::Studio.Manage.SaveData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public global::Studio.AssetTool.SaveData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (reader.TryReadNil())
|
||||
{
|
||||
@@ -323,20 +323,20 @@ namespace MessagePack.Formatters.XED.Manage
|
||||
options.Security.DepthStep(ref reader);
|
||||
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
|
||||
var length = reader.ReadArrayHeader();
|
||||
var ____result = new global::Studio.Manage.SaveData();
|
||||
var ____result = new global::Studio.AssetTool.SaveData();
|
||||
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
____result.modelDatas = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::Studio.Manage.SavedModelData[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
____result.modelDatas = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::Studio.AssetTool.SavedModelData[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
break;
|
||||
case 1:
|
||||
____result.textureDatas = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::Studio.Manage.TextureData[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
____result.textureDatas = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::Studio.AssetTool.TextureData[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
break;
|
||||
case 2:
|
||||
____result.thumbnailDatas = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::Studio.Manage.ThumbnailData[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
____result.thumbnailDatas = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::Studio.AssetTool.ThumbnailData[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
break;
|
||||
default:
|
||||
reader.Skip();
|
||||
@@ -349,10 +349,10 @@ namespace MessagePack.Formatters.XED.Manage
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class SavedModelDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::Studio.Manage.SavedModelData>
|
||||
public sealed class SavedModelDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::Studio.AssetTool.SavedModelData>
|
||||
{
|
||||
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::Studio.Manage.SavedModelData value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::Studio.AssetTool.SavedModelData value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
@@ -363,10 +363,10 @@ namespace MessagePack.Formatters.XED.Manage
|
||||
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
|
||||
writer.WriteArrayHeader(2);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string[][]>(formatterResolver).Serialize(ref writer, value.attributes, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::Studio.Manage.ModelData[]>(formatterResolver).Serialize(ref writer, value.models, options);
|
||||
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::Studio.AssetTool.ModelData[]>(formatterResolver).Serialize(ref writer, value.models, options);
|
||||
}
|
||||
|
||||
public global::Studio.Manage.SavedModelData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public global::Studio.AssetTool.SavedModelData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (reader.TryReadNil())
|
||||
{
|
||||
@@ -376,7 +376,7 @@ namespace MessagePack.Formatters.XED.Manage
|
||||
options.Security.DepthStep(ref reader);
|
||||
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
|
||||
var length = reader.ReadArrayHeader();
|
||||
var ____result = new global::Studio.Manage.SavedModelData();
|
||||
var ____result = new global::Studio.AssetTool.SavedModelData();
|
||||
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
@@ -386,7 +386,7 @@ namespace MessagePack.Formatters.XED.Manage
|
||||
____result.attributes = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string[][]>(formatterResolver).Deserialize(ref reader, options);
|
||||
break;
|
||||
case 1:
|
||||
____result.models = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::Studio.Manage.ModelData[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
____result.models = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::Studio.AssetTool.ModelData[]>(formatterResolver).Deserialize(ref reader, options);
|
||||
break;
|
||||
default:
|
||||
reader.Skip();
|
||||
@@ -708,10 +708,10 @@ namespace MessagePack.Formatters.XED.Manage
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class TextureDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::Studio.Manage.TextureData>
|
||||
public sealed class TextureDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::Studio.AssetTool.TextureData>
|
||||
{
|
||||
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::Studio.Manage.TextureData value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::Studio.AssetTool.TextureData value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
@@ -726,7 +726,7 @@ namespace MessagePack.Formatters.XED.Manage
|
||||
writer.Write(value.data);
|
||||
}
|
||||
|
||||
public global::Studio.Manage.TextureData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public global::Studio.AssetTool.TextureData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (reader.TryReadNil())
|
||||
{
|
||||
@@ -759,16 +759,16 @@ namespace MessagePack.Formatters.XED.Manage
|
||||
}
|
||||
}
|
||||
|
||||
var ____result = new global::Studio.Manage.TextureData(__name__, __uid__, __data__);
|
||||
var ____result = new global::Studio.AssetTool.TextureData(__name__, __uid__, __data__);
|
||||
reader.Depth--;
|
||||
return ____result;
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ThumbnailDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::Studio.Manage.ThumbnailData>
|
||||
public sealed class ThumbnailDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::Studio.AssetTool.ThumbnailData>
|
||||
{
|
||||
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::Studio.Manage.ThumbnailData value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::Studio.AssetTool.ThumbnailData value, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
@@ -780,7 +780,7 @@ namespace MessagePack.Formatters.XED.Manage
|
||||
writer.Write(value.data);
|
||||
}
|
||||
|
||||
public global::Studio.Manage.ThumbnailData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
public global::Studio.AssetTool.ThumbnailData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
|
||||
{
|
||||
if (reader.TryReadNil())
|
||||
{
|
||||
@@ -804,7 +804,7 @@ namespace MessagePack.Formatters.XED.Manage
|
||||
}
|
||||
}
|
||||
|
||||
var ____result = new global::Studio.Manage.ThumbnailData(__data__);
|
||||
var ____result = new global::Studio.AssetTool.ThumbnailData(__data__);
|
||||
reader.Depth--;
|
||||
return ____result;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ using Studio.Core;
|
||||
using System.Collections;
|
||||
using Studio.AssetLibraryTree;
|
||||
|
||||
namespace Studio.Asset
|
||||
namespace Studio.AssetTool
|
||||
{
|
||||
public class CustomAssetConnector : Manager
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using Studio.Asset;
|
||||
using Studio.AssetTool;
|
||||
using Studio.AssetLibraryTree;
|
||||
using Studio.HierarchyTree;
|
||||
using Studio.Manage;
|
||||
using Studio.Util;
|
||||
|
||||
namespace Studio
|
||||
namespace Studio.AssetTool
|
||||
{
|
||||
public class CustomAssetDataHandler
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ using Studio.HierarchyTree;
|
||||
using Studio.Manage;
|
||||
using Studio.Util;
|
||||
|
||||
namespace Studio.Asset
|
||||
namespace Studio.AssetTool
|
||||
{
|
||||
public class CustomAssetEventHandler
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ using UnityEngine.EventSystems;
|
||||
using Studio.DataStructures;
|
||||
using Studio.UI;
|
||||
|
||||
namespace Studio.Util
|
||||
namespace Studio.AssetTool
|
||||
{
|
||||
public class CustomAssetRenderObject : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
|
||||
{
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Studio
|
||||
{
|
||||
public class DirectorySearch
|
||||
{
|
||||
private float maxFileSize;//MB´ÜÀ§
|
||||
private List<DirectoryInfo> folders = new();
|
||||
|
||||
public DirectorySearch(float maxFileSize)
|
||||
{
|
||||
this.maxFileSize = maxFileSize;
|
||||
}
|
||||
|
||||
public List<DirectoryInfo> SearchDirectory(string dirpath)
|
||||
{
|
||||
folders.Clear();
|
||||
var info = new DirectoryInfo(dirpath);
|
||||
CreateFolderItem(info);
|
||||
GetDirectoryInPath(info);
|
||||
|
||||
return folders;
|
||||
}
|
||||
void GetDirectoryInPath(DirectoryInfo info)
|
||||
{
|
||||
var dirInfo = info.GetDirectories();
|
||||
foreach (var dir in dirInfo)
|
||||
{
|
||||
CreateFolderItem(dir);
|
||||
if (dir.GetDirectories().Length > 0)
|
||||
{
|
||||
GetDirectoryInPath(dir);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CreateFolderItem(DirectoryInfo dir)
|
||||
{
|
||||
folders.Add(dir);
|
||||
}
|
||||
|
||||
public List<FileInfo> GetFilesInPath(DirectoryInfo info)
|
||||
{
|
||||
var fileInfo = GetFilesByExtensions(info, new string[] { ".FBX", ".OBJ", ".GLTF2", ".STL", ".PLY", ".3MF", ".DAE" });
|
||||
var satisfyFiles = IsOverFileSize(fileInfo);
|
||||
var files = new List<FileInfo>();
|
||||
foreach (var file in satisfyFiles)
|
||||
{
|
||||
files.Add(file);
|
||||
}
|
||||
|
||||
return files;
|
||||
}
|
||||
|
||||
IEnumerable<FileInfo> GetFilesByExtensions(DirectoryInfo dir, params string[] extensions)
|
||||
{
|
||||
if (extensions == null)
|
||||
throw new ArgumentNullException("extensions");
|
||||
IEnumerable<FileInfo> files = dir.EnumerateFiles();
|
||||
return files.Where(f => extensions.Contains(f.Extension, StringComparer.OrdinalIgnoreCase));
|
||||
}
|
||||
|
||||
IEnumerable<FileInfo> IsOverFileSize(IEnumerable<FileInfo> files)
|
||||
{
|
||||
var satisfyFile = files.Where(f => f.Length / Mathf.Pow(1024f, 2f) < maxFileSize);
|
||||
return satisfyFile;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a99fa57281907424d971e68860da2248
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -9,11 +9,12 @@ using System.Threading.Tasks;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Studio.Repositories;
|
||||
using Studio.Asset;
|
||||
using Studio.AssetTool;
|
||||
using Ookii.Dialogs;
|
||||
using Studio.Command;
|
||||
using Studio.Manage;
|
||||
|
||||
namespace Studio.Manage
|
||||
namespace Studio.AssetTool
|
||||
{
|
||||
public class FBXFileManager : Manager
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using MessagePack;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Studio.Manage
|
||||
namespace Studio.AssetTool
|
||||
{
|
||||
[MessagePackObject]
|
||||
public class MaterialPropertyData
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using MessagePack;
|
||||
using Studio.Manage;
|
||||
|
||||
namespace Studio.Manage
|
||||
namespace Studio.AssetTool
|
||||
{
|
||||
[MessagePackObject]
|
||||
public class ModelData
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Studio.Util
|
||||
namespace Studio.AssetTool
|
||||
{
|
||||
public class ObjectSnap : MonoBehaviour
|
||||
{
|
||||
|
||||
@@ -4,14 +4,14 @@ using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using Studio.Asset;
|
||||
using Studio.AssetTool;
|
||||
using Studio.Command;
|
||||
using Studio.DataStructures;
|
||||
using Studio.Interfaces;
|
||||
using Studio.Manage;
|
||||
using Studio.RuntimeGizmo;
|
||||
|
||||
namespace Studio.Util
|
||||
namespace Studio.AssetTool
|
||||
{
|
||||
public class RenderObjectHandler : Manager, IModeController, IInputHandler
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using MessagePack;
|
||||
using Studio.Manage;
|
||||
|
||||
namespace Studio.Manage
|
||||
namespace Studio.AssetTool
|
||||
{
|
||||
[MessagePackObject]
|
||||
public class SaveData
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
using MessagePack;
|
||||
using Studio.Manage;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Studio.Manage
|
||||
namespace Studio.AssetTool
|
||||
{
|
||||
[MessagePackObject]
|
||||
public class SavedModelData
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
using Studio.Manage;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Studio.Manage
|
||||
namespace Studio.AssetTool
|
||||
{
|
||||
public class SharedMaterial
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using MessagePack;
|
||||
|
||||
namespace Studio.Manage
|
||||
namespace Studio.AssetTool
|
||||
{
|
||||
|
||||
[MessagePackObject]
|
||||
@@ -1,120 +0,0 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor.AddressableAssets.Settings;
|
||||
using UnityEditor.AddressableAssets;
|
||||
#endif
|
||||
|
||||
namespace Studio
|
||||
{
|
||||
public class TwinObjectPreprocessingHelper
|
||||
{
|
||||
static List<TwinContainer> twinContainerList = new();
|
||||
|
||||
#if UNITY_EDITOR
|
||||
[MenuItem("Tools/TwinObjectsSetting")]
|
||||
public static void TwinObjectsSetting()
|
||||
{
|
||||
AutomateTwinObjectSetup();
|
||||
}
|
||||
|
||||
|
||||
//TODO : 경로를 하드코딩 하는 방식 이외의 다른 방식 활용, Prefab 의 이름 파싱을 이용한 방식 활용(PRF_Robot01_Robot)
|
||||
static void AutomateTwinObjectSetup()
|
||||
{
|
||||
var mainPath = "C:/Users/UVC_JYM/Desktop/Test";
|
||||
var beforePath = string.Concat(mainPath, "TwinObject_BeforeProcessing");
|
||||
var afterPath = string.Concat(mainPath, "TwinObject_AfterProcessing/");
|
||||
string etcPath = string.Concat(mainPath, "$etc");
|
||||
|
||||
CreateAddressableAssets(beforePath, etcPath, afterPath);
|
||||
}
|
||||
static void CreateAddressableAssets(string beforePath, string etcPath, string afterPath)
|
||||
{
|
||||
//beforPath 폴더 안의 타입이 프리팹인 Asset의 guid를 모두 찾습니다.
|
||||
string[] guids = AssetDatabase.FindAssets("t:Prefab", new string[] { beforePath });
|
||||
|
||||
foreach (var guid in guids)
|
||||
{
|
||||
//guid 에 해당하는 Asset 의 경로를 찾습니다.
|
||||
string filePath = AssetDatabase.GUIDToAssetPath(guid);
|
||||
|
||||
if (filePath.StartsWith(etcPath))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
//경로에 해당하는 Asset 을 찾습니다.
|
||||
var loadAsset = AssetDatabase.LoadAssetAtPath<GameObject>(filePath);
|
||||
var twinObject = loadAsset.GetComponent<TwinObject>();
|
||||
|
||||
string fileName = Path.GetFileName(filePath);
|
||||
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(filePath);
|
||||
string folderPath = string.Concat(afterPath, fileNameWithoutExtension);
|
||||
string fullPath = string.Concat(folderPath, "/", fileName);
|
||||
|
||||
|
||||
//TwinObject 미리보기 이미지를 생성합니다.
|
||||
var texture = CreateTwinObjectPortrait(folderPath, twinObject);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static Texture2D CreateTwinObjectPortrait(string folderPath, TwinObject twinObject)
|
||||
{
|
||||
Texture2D thumbnailTexture = null;
|
||||
|
||||
//미리보기 텍스처 생성
|
||||
while (thumbnailTexture == null)
|
||||
{
|
||||
thumbnailTexture = AssetPreview.GetAssetPreview(twinObject.gameObject);
|
||||
System.Threading.Thread.Sleep(5);
|
||||
}
|
||||
|
||||
var transparentTexture = BackgroundTransparencyProcess(thumbnailTexture);
|
||||
//텍스처 저장
|
||||
transparentTexture.name = string.Concat("Texture_", twinObject.name);
|
||||
byte[] bytes = transparentTexture.EncodeToPNG();
|
||||
string filePath = string.Concat(folderPath, "/", transparentTexture.name, ".png");
|
||||
|
||||
File.WriteAllBytes(filePath, bytes);
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
//텍스처 불러오기
|
||||
var texture = AssetDatabase.LoadAssetAtPath<Texture2D>(filePath);
|
||||
return texture;
|
||||
}
|
||||
|
||||
static Texture2D BackgroundTransparencyProcess(Texture2D texture)
|
||||
{
|
||||
var transparentTexture = new Texture2D(texture.width, texture.height);
|
||||
transparentTexture.SetPixels(texture.GetPixels());
|
||||
|
||||
for (int h = 0; h < texture.height; h++)
|
||||
{
|
||||
for (int w = 0; w < texture.width; w++)
|
||||
{
|
||||
transparentTexture.SetPixel(w, h, Color.clear);
|
||||
|
||||
if (texture.GetPixel(w, h) != texture.GetPixel(w + 1, h))
|
||||
break;
|
||||
}
|
||||
|
||||
for (int w = texture.width; w > 0; w--)
|
||||
{
|
||||
transparentTexture.SetPixel(w, h, Color.clear);
|
||||
|
||||
if (texture.GetPixel(w, h) != texture.GetPixel(w - 1, h))
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
transparentTexture.Apply();
|
||||
return transparentTexture;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f47017ab9520f8844869029ec454f90b
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
using Studio.Asset;
|
||||
using Studio.AssetTool;
|
||||
using Studio.Command;
|
||||
using Studio.Manage;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Studio.Asset;
|
||||
using Studio.AssetTool;
|
||||
|
||||
namespace Studio.Command
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using Studio.Asset;
|
||||
using Studio.AssetTool;
|
||||
using Studio.Manage;
|
||||
using Studio.Repositories;
|
||||
using Studio.Util;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using Studio.Manage;
|
||||
using Studio.AssetTool;
|
||||
|
||||
namespace Studio.Command
|
||||
{
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Studio.AssetTool;
|
||||
using Studio.Manage;
|
||||
using Studio.RuntimeGizmo;
|
||||
using Studio.Util;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Studio.AssetTool;
|
||||
using Studio.Manage;
|
||||
using Studio.RuntimeGizmo;
|
||||
using Studio.Util;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Studio.AssetTool;
|
||||
using Studio.Manage;
|
||||
using Studio.RuntimeGizmo;
|
||||
using Studio.Util;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Studio.AssetTool;
|
||||
using Studio.Manage;
|
||||
using Studio.RuntimeGizmo;
|
||||
using Studio.Util;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Studio.Asset;
|
||||
using Studio.AssetTool;
|
||||
using Studio.HierarchyTree;
|
||||
using Studio.Manage;
|
||||
using Studio.Util;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using Studio.Asset;
|
||||
using Studio.AssetTool;
|
||||
using Studio.Command;
|
||||
using Studio.HierarchyTree;
|
||||
using Studio.Manage;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using Studio.Asset;
|
||||
using Studio.AssetTool;
|
||||
using Studio.HierarchyTree;
|
||||
using Studio.Manage;
|
||||
using Studio.Util;
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using TriLibCore.SFB;
|
||||
using Studio.Asset;
|
||||
using Studio.AssetTool;
|
||||
using Studio.HierarchyTree;
|
||||
using Studio.Manage;
|
||||
using Studio.Util;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Studio.Asset;
|
||||
using Studio.AssetTool;
|
||||
using Studio.Manage;
|
||||
|
||||
namespace Studio.Command
|
||||
|
||||
@@ -3,7 +3,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using TriLibCore.SFB;
|
||||
using Studio.Asset;
|
||||
using Studio.AssetTool;
|
||||
using Studio.Command;
|
||||
using Studio.Manage;
|
||||
using Studio.Service;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Studio.Asset;
|
||||
using Studio.AssetTool;
|
||||
using Studio.Command;
|
||||
using Studio.Manage;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using MessagePack;
|
||||
|
||||
namespace Studio.Manage
|
||||
namespace Studio.AssetTool
|
||||
{
|
||||
[MessagePackObject]
|
||||
public class ThumbnailData
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Studio.Asset;
|
||||
using Studio.AssetTool;
|
||||
using Studio.Core;
|
||||
using Studio.Util;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Linq;
|
||||
using TriLibCore.Dae.Schema;
|
||||
using TriLibCore.SFB;
|
||||
using UnityEditor;
|
||||
using Studio.Asset;
|
||||
using Studio.AssetTool;
|
||||
using Studio.Command;
|
||||
using Studio.HierarchyTree;
|
||||
using Studio.Service;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using Studio.Util;
|
||||
using Studio.Asset;
|
||||
using Studio.AssetTool;
|
||||
using System.Linq;
|
||||
using Studio.HierarchyTree;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using UnityEngine;
|
||||
using Studio.Asset;
|
||||
using Studio.AssetTool;
|
||||
using Studio.Manage;
|
||||
using Studio.UI;
|
||||
using XRLib.UI;
|
||||
|
||||
@@ -7,6 +7,7 @@ using XRLib;
|
||||
using XRLib.UI;
|
||||
using XED;
|
||||
using XED.UI;
|
||||
using Studio.AssetTool;
|
||||
|
||||
namespace Studio
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ using UnityEngine;
|
||||
using Studio.Manage;
|
||||
using Studio.Util;
|
||||
using Studio.Command;
|
||||
using Studio.AssetTool;
|
||||
|
||||
namespace Studio.UI
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using Studio.Asset;
|
||||
using Studio.AssetTool;
|
||||
using Studio.Manage;
|
||||
using Studio.Util;
|
||||
using XRLib.UI;
|
||||
|
||||
@@ -5,6 +5,7 @@ using UnityEngine;
|
||||
using Studio.Util;
|
||||
using XRLib;
|
||||
using XRLib.UI;
|
||||
using Studio.AssetTool;
|
||||
|
||||
namespace Studio.UI
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@ using UnityEngine.EventSystems;
|
||||
using UnityEngine.Events;
|
||||
using Studio.Manage;
|
||||
using Studio.Util;
|
||||
using Studio.AssetTool;
|
||||
|
||||
namespace Studio.AssetLibraryTree
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
using XRLib.UI;
|
||||
using Studio.Asset;
|
||||
using Studio.AssetTool;
|
||||
using Studio.HierarchyTree;
|
||||
using Studio.Manage;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ using UnityEngine;
|
||||
using XRLib;
|
||||
using Studio.Interfaces;
|
||||
using Studio.Test;
|
||||
using Studio.Asset;
|
||||
using Studio.AssetTool;
|
||||
using Object = UnityEngine.Object;
|
||||
using static Studio.Enums;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user