Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

サンプルの構成変更 #1155

Merged
merged 14 commits into from
Aug 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions Assets/StreamingAssets.meta

This file was deleted.

File renamed without changes.
9 changes: 7 additions & 2 deletions Assets/UniGLTF/UniHumanoid/Scripts/IO/BvhImporterContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace UniHumanoid
{
[Obsolete("use BvhImporterContext")]
public class ImporterContext: BvhImporterContext
public class ImporterContext : BvhImporterContext
{
}

Expand Down Expand Up @@ -51,9 +51,14 @@ public void Parse()
}

public void Parse(string path)
{
Parse(path, File.ReadAllText(Path, Encoding.UTF8));
}

public void Parse(string path, string source)
{
Path = path;
Source = File.ReadAllText(Path, Encoding.UTF8);
Source = source;
Bvh = Bvh.Parse(Source);
}

Expand Down
2 changes: 1 addition & 1 deletion Assets/UniGLTF/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "2.16.0",
"displayName": "UniGLTF",
"description": "GLTF importer and exporter",
"unity": "2018.4",
"unity": "2019.4",
"keywords": [
"gltf"
],
Expand Down
9 changes: 0 additions & 9 deletions Assets/VRM.Samples/Editor.meta

This file was deleted.

9 changes: 0 additions & 9 deletions Assets/VRM.Samples/Scripts.meta

This file was deleted.

18 changes: 0 additions & 18 deletions Assets/VRM.Samples/VRM.Samples.asmdef

This file was deleted.

7 changes: 0 additions & 7 deletions Assets/VRM.Samples/VRM.Samples.asmdef.meta

This file was deleted.

71 changes: 61 additions & 10 deletions Assets/VRM/Editor/Format/VRMVersionMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,27 +56,25 @@ public static partial class VRMVersion

struct UpmPackage
{
public readonly string Name;
public readonly string Path;
public readonly string Template;

public UpmPackage(string name, string path, string template)
public UpmPackage(string path, string template)
{
Name = name;
Path = path;
Template = template;
}
}

UpmPackage[] Packages = new UpmPackage[]
{
new UpmPackage("VRMShaders", "Assets/VRMShaders/package.json",
new UpmPackage("Assets/VRMShaders/package.json",
@"{{
""name"": ""com.vrmc.vrmshaders"",
""version"": ""{1}"",
""displayName"": ""VRM Shaders"",
""description"": ""VRM Shaders"",
""unity"": ""2018.4"",
""unity"": ""2019.4"",
""keywords"": [
""vrm"",
""shader""
Expand All @@ -86,13 +84,13 @@ public UpmPackage(string name, string path, string template)
}}
}}
"),
new UpmPackage("VRM", "Assets/VRM/package.json",
new UpmPackage("Assets/VRM/package.json",
@"{{
""name"": ""com.vrmc.univrm"",
""version"": ""{1}"",
""displayName"": ""VRM"",
""description"": ""VRM importer"",
""unity"": ""2018.4"",
""unity"": ""2019.4"",
""keywords"": [
""vrm"",
""importer"",
Expand All @@ -105,18 +103,71 @@ public UpmPackage(string name, string path, string template)
""dependencies"": {{
""com.vrmc.vrmshaders"": ""{1}"",
""com.vrmc.unigltf"": ""{0}""
}}
}},
""samples"": [
{{
""displayName"": ""SimpleViewer"",
""description"": ""VRM runtime loader sample"",
""path"": ""Samples/SimpleViewer""
}},
{{
""displayName"": ""FirstPersonSample"",
""description"": ""First Person layer sample with multi camera"",
""path"": ""Samples/FirstPersonSample""
}},
{{
""displayName"": ""RuntimeExporterSample"",
""description"": ""VRM runtime exporter sample"",
""path"": ""Samples/RuntimeExporterSample""
}},
{{
""displayName"": ""AnimationBridgeSample"",
""description"": ""BlendShape animation clip sample"",
""path"": ""Samples/AnimationBridgeSample""
}}
]
}}
"),

new UpmPackage("Assets/VRM10/package.json",
@"{{
""name"": ""com.vrmc.vrm"",
""version"": ""{1}"",
""displayName"": ""VRM-1.0β"",
""description"": ""VRM-1.0β importer"",
""unity"": ""2019.4"",
""keywords"": [
""vrm"",
""importer"",
""avatar"",
""vr""
],
""author"": {{
""name"": ""VRM Consortium""
}},
""dependencies"": {{
""com.vrmc.vrmshaders"": ""{1}"",
""com.vrmc.unigltf"": ""{0}""
}},
""samples"": [
{{
""displayName"": ""VRM10Viewer"",
""description"": ""VRM10 runtime loader sample"",
""path"": ""Samples/VRM10Viewer""
}}
]
}}
"),

};

UpmPackage UniGLTFPackage = new UpmPackage("UniGLTF", "Assets/UniGLTF/package.json",
UpmPackage UniGLTFPackage = new UpmPackage("Assets/UniGLTF/package.json",
@"{{
""name"": ""com.vrmc.unigltf"",
""version"": ""{0}"",
""displayName"": ""UniGLTF"",
""description"": ""GLTF importer and exporter"",
""unity"": ""2018.4"",
""unity"": ""2019.4"",
""keywords"": [
""gltf""
],
Expand Down
27 changes: 9 additions & 18 deletions Assets/VRM/Editor/VRMExportUnityPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ static string MakePackagePathName(string folder, string prefix)
"DevOnly",
"doc",
"Profiling",
"Samples",
};

static IEnumerable<string> GlobFiles(string path)
Expand Down Expand Up @@ -188,40 +189,30 @@ public PackageInfo(string name)

public static void CreateUnityPackages(string outputDir)
{
// UniVRM and sub packages
{
var packages = new[]{
new PackageInfo("UniVRM0X")
// UniGLTF + VRMShaders
new PackageInfo("UniGLTF_VRMShaders")
{
List = new []{
new GlobList("Assets/VRM"),
new GlobList("Assets/VRMShaders"),
new GlobList("Assets/UniGLTF"),
}
},
new PackageInfo("UniVRM0X-samples")
// VRM
new PackageInfo("UniVRM")
{
List = new[]{
new GlobList("Assets/VRM.Samples"),
new GlobList("Assets/StreamingAssets/VRM.Samples"),
List = new []{
new GlobList("Assets/VRM"),
}
},
new PackageInfo("UniVRM10")
// VRM-1.0
new PackageInfo("VRM")
{
List = new []{
new GlobList("Assets/VRM10"),
new GlobList("Assets/VRMShaders"),
new GlobList("Assets/UniGLTF"),
}
},
new PackageInfo("UniVRM10-samples")
{
List = new[]{
new GlobList("Assets/VRM10.Samples"),
new GlobList("Assets/UniGLTF.Samples"), // look dev resources
new GlobList("Assets/StreamingAssets/VRM.Samples"),
}
}
};
foreach (var package in packages)
{
Expand Down
3 changes: 1 addition & 2 deletions Assets/VRM.Samples.meta → Assets/VRM/Samples.meta

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

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using UnityEngine;

namespace VRM.Samples
namespace VRM.AnimationBridgeSample
{
/// <summary>
/// VRMからAnimatorを取り外してからアタッチしてください。
Expand Down

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

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using UnityEngine.UI;


namespace VRM.Samples
namespace VRM.FirstPersonSample
{
public class CanvasManager : MonoBehaviour
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#endif


namespace UniVRM10.Samples
namespace VRM.FirstPersonSample
{
public static class FileDialogForWindows
{
Expand Down Expand Up @@ -63,7 +63,7 @@ public static string FileDialog(string title, params string[] extensions)

var filters = new List<string>();
filters.Add("All Files"); filters.Add("*.*");
foreach (var ext in extensions)
foreach(var ext in extensions)
{
filters.Add(ext); filters.Add("*" + ext);
}
Expand Down
12 changes: 12 additions & 0 deletions Assets/VRM/Samples/FirstPersonSample/FileDialogForWindows.cs.meta

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

Loading