Add VRChat and GitHub packages to Unity project

This commit is contained in:
gunnbr committed 2021-01-18 09:14:18 -08:00
1 parent 0334a52b21
commit 85538aaccc
3297 files changed
+847877

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: bb5768ae4d251fa4d87b092a2e6e422e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7adf8ee48f4d3904c87375f59aafa513
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,71 @@
using System.IO;
using System.Linq;
using UnityEditor;
using UnityEditor.PackageManager;
using UnityEditor.PackageManager.Requests;
using UnityEngine;
namespace VRC.Udon.Editor {
[InitializeOnLoad]
public class UPMImporter
{
// Add packages here to auto-import
public static string[] requiredPackages =
{
"com.unity.cinemachine@2.6.3",
"com.unity.postprocessing@2.3.0",
"com.unity.textmeshpro@1.4.1",
};
private static ListRequest list;
static UPMImporter()
{
list = Client.List();
EditorApplication.update += Update;
}
public static void Update()
{
// Exit early if we're still gathering the list
if (!list.IsCompleted) return;
// Unsubscribe from Update once the list is ready
EditorApplication.update -= Update;
var localPackages = list.Result;
bool importedNewPackage = false;
foreach (string packageName in requiredPackages)
{
var packageNameNoVersion = packageName.Substring(0, packageName.IndexOf('@'));
if(!localPackages.Any(p => p.name == packageNameNoVersion))
{
Install(packageName);
importedNewPackage = true;
}
}
// if Unity tried to import SDK3 before required packages, it will have old errors showing.
if(importedNewPackage) ClearLog();
}
public static bool Install(string id)
{
var request = Client.Add(id);
while (!request.IsCompleted) {};
if(request.Error != null)Debug.LogError(request.Error.message);
return request.Error == null;
}
public static void ClearLog()
{
System.Reflection.Assembly assembly = System.Reflection.Assembly.GetAssembly(typeof(SceneView));
System.Type type = assembly.GetType("UnityEditor.LogEntries");
System.Reflection.MethodInfo method = type.GetMethod("Clear");
method.Invoke(new object(), null);
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1056c67d11ce3ce41b80a979e05732c4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,14 @@
{
"name": "VRC.Udon.Editor.UPMImporter",
"references": [],
"optionalUnityReferences": [],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": []
}
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 4704b64fff8057d49a97d061be599eea
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+7
View File
@@ -0,0 +1,7 @@
{
"name" : "com.vrchat.vrcsdk3",
"displayName" : "VRChat SDK3 - Worlds",
"version" : "2020.3.2",
"unity" : "2018.4",
"description" : "SDK 3 with Udon, our in-house node-based scripting language for awesome interactivity!"
}
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 6d4603f5cd56d5f4289993be967b5ef2
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+44
View File
@@ -0,0 +1,44 @@
{
"dependencies": {
"com.unity.ads": "2.0.8",
"com.unity.analytics": "3.2.3",
"com.unity.cinemachine": "2.6.3",
"com.unity.collab-proxy": "1.2.15",
"com.unity.package-manager-ui": "2.0.8",
"com.unity.postprocessing": "2.3.0",
"com.unity.purchasing": "2.0.3",
"com.unity.textmeshpro": "1.4.1",
"com.unity.xr.oculus.standalone": "1.38.4",
"com.unity.xr.openvr.standalone": "1.0.5",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.animation": "1.0.0",
"com.unity.modules.assetbundle": "1.0.0",
"com.unity.modules.audio": "1.0.0",
"com.unity.modules.cloth": "1.0.0",
"com.unity.modules.director": "1.0.0",
"com.unity.modules.imageconversion": "1.0.0",
"com.unity.modules.imgui": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.modules.particlesystem": "1.0.0",
"com.unity.modules.physics": "1.0.0",
"com.unity.modules.physics2d": "1.0.0",
"com.unity.modules.screencapture": "1.0.0",
"com.unity.modules.terrain": "1.0.0",
"com.unity.modules.terrainphysics": "1.0.0",
"com.unity.modules.tilemap": "1.0.0",
"com.unity.modules.ui": "1.0.0",
"com.unity.modules.uielements": "1.0.0",
"com.unity.modules.umbra": "1.0.0",
"com.unity.modules.unityanalytics": "1.0.0",
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.modules.unitywebrequestassetbundle": "1.0.0",
"com.unity.modules.unitywebrequestaudio": "1.0.0",
"com.unity.modules.unitywebrequesttexture": "1.0.0",
"com.unity.modules.unitywebrequestwww": "1.0.0",
"com.unity.modules.vehicles": "1.0.0",
"com.unity.modules.video": "1.0.0",
"com.unity.modules.vr": "1.0.0",
"com.unity.modules.wind": "1.0.0",
"com.unity.modules.xr": "1.0.0"
}
}