Added Unity project files
This commit is contained in:
@ -0,0 +1,40 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEditor.Build;
|
||||
using UnityEditor.Build.Reporting;
|
||||
using UnityEditor.Rendering;
|
||||
using UnityEngine;
|
||||
using VRC.SDKBase.Editor.BuildPipeline;
|
||||
|
||||
public class StripAndroidAvatars : IPreprocessShaders, IVRCSDKBuildRequestedCallback, IPostprocessBuildWithReport
|
||||
{
|
||||
private static VRCSDKRequestedBuildType? _buildType = null;
|
||||
|
||||
public int callbackOrder => 0;
|
||||
|
||||
public bool OnBuildRequested(VRCSDKRequestedBuildType requestedBuildType)
|
||||
{
|
||||
_buildType = requestedBuildType;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void OnProcessShader(Shader shader, ShaderSnippetData snippet, IList<ShaderCompilerData> data)
|
||||
{
|
||||
if(_buildType != VRCSDKRequestedBuildType.Avatar)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(EditorUserBuildSettings.activeBuildTarget != BuildTarget.Android)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
data.Clear();
|
||||
}
|
||||
|
||||
public void OnPostprocessBuild(BuildReport report)
|
||||
{
|
||||
_buildType = null;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3f05fc74d61cc0c448411f8b55c918ca
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,29 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEditor.Build;
|
||||
using UnityEditor.Rendering;
|
||||
using UnityEngine;
|
||||
|
||||
namespace VRC.SDKBase.Editor.ShaderStripping
|
||||
{
|
||||
public class StripPostProcessing : IPreprocessShaders
|
||||
{
|
||||
public int callbackOrder => 0;
|
||||
|
||||
public void OnProcessShader(Shader shader, ShaderSnippetData snippet, IList<ShaderCompilerData> data)
|
||||
{
|
||||
if(EditorUserBuildSettings.activeBuildTarget != BuildTarget.Android && EditorUserBuildSettings.activeBuildTarget != BuildTarget.iOS)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
string shaderName = shader.name;
|
||||
if(string.IsNullOrEmpty(shaderName) || !shaderName.Contains("PostProcessing"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
data.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 06d01ef00e2795244aa8b5cbe879b16e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "VRC.SDKBase.Editor.ShaderStripping",
|
||||
"references": [],
|
||||
"optionalUnityReferences": [],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [
|
||||
"VRCSDKBase-Editor.dll"
|
||||
],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": []
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 09158b5a87ea9554daafaef906ae927e
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user