Skip to content

Commit

Permalink
Fix remaining non-URP compatible materials, disable WebXR autoloaders
Browse files Browse the repository at this point in the history
  • Loading branch information
bnco-dev committed Apr 8, 2024
1 parent 222d211 commit 84d2397
Show file tree
Hide file tree
Showing 6 changed files with 178 additions and 14 deletions.
126 changes: 126 additions & 0 deletions Unity/Assets/Ubiq/Samples/Demo (XRI)/Assets/Materials/Box.mat
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-4683836992559550773
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Box
m_Shader: {fileID: -6465566751694194690, guid: 534142c5ef1b5294d980e9bfad3c942c,
type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BUILTIN_QueueControl: 0
- _BUILTIN_QueueOffset: 0
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _QueueControl: 0
- _QueueOffset: 0
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.8490566, g: 0.5733868, b: 0.53266287, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []
--- !u!114 &917962333850309919
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 639247ca83abc874e893eb93af2b5e44, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 0

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

29 changes: 17 additions & 12 deletions Unity/Assets/Ubiq/Samples/Demo (XRI)/Demo.unity
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,11 @@ PrefabInstance:
propertyPath: m_RootOrder
value: 4
objectReference: {fileID: 0}
- target: {fileID: 3240370694413710571, guid: 76e53f38a7ad1c44bb05311d46bf216d,
type: 3}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: 2100000, guid: 95740d400bace5446a4a35862ade2f81, type: 2}
- target: {fileID: 4819973546623887357, guid: 76e53f38a7ad1c44bb05311d46bf216d,
type: 3}
propertyPath: m_RootOrder
Expand Down Expand Up @@ -590,32 +595,32 @@ PrefabInstance:
- target: {fileID: 743039901501322695, guid: 73369a530bd8253469d623a3ea6dcff9,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 743039901501322695, guid: 73369a530bd8253469d623a3ea6dcff9,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 743039901501322695, guid: 73369a530bd8253469d623a3ea6dcff9,
type: 3}
propertyPath: m_SizeDelta.x
value: 30
value: 0
objectReference: {fileID: 0}
- target: {fileID: 743039901501322695, guid: 73369a530bd8253469d623a3ea6dcff9,
type: 3}
propertyPath: m_SizeDelta.y
value: 40
value: 0
objectReference: {fileID: 0}
- target: {fileID: 743039901501322695, guid: 73369a530bd8253469d623a3ea6dcff9,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 53
value: 0
objectReference: {fileID: 0}
- target: {fileID: 743039901501322695, guid: 73369a530bd8253469d623a3ea6dcff9,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -22.5
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1253916436262327332, guid: 73369a530bd8253469d623a3ea6dcff9,
type: 3}
Expand Down Expand Up @@ -855,32 +860,32 @@ PrefabInstance:
- target: {fileID: 6806867407171974117, guid: 73369a530bd8253469d623a3ea6dcff9,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6806867407171974117, guid: 73369a530bd8253469d623a3ea6dcff9,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6806867407171974117, guid: 73369a530bd8253469d623a3ea6dcff9,
type: 3}
propertyPath: m_SizeDelta.x
value: 30
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6806867407171974117, guid: 73369a530bd8253469d623a3ea6dcff9,
type: 3}
propertyPath: m_SizeDelta.y
value: 40
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6806867407171974117, guid: 73369a530bd8253469d623a3ea6dcff9,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 21
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6806867407171974117, guid: 73369a530bd8253469d623a3ea6dcff9,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -22.5
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6866552682078070656, guid: 73369a530bd8253469d623a3ea6dcff9,
type: 3}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using UnityEditor;
using Ubiq.Editor;
using Ubiq.Editor.XRI;
using WebXR;

namespace Ubiq.Samples.WebXR.Editor
{
Expand Down Expand Up @@ -47,6 +48,29 @@ static void Update()
#endif
#if WEBXRINTERACTIONS_0_22_0_OR_NEWER
PackageManagerHelper.RequireSample("com.de-panther.webxr-interactions","XR Interaction Toolkit Sample");
#endif
#if !UBIQ_DISABLE_WEBXRAUTOLOADOFF
var settings = WebXRSettings.GetSettings();
if (settings.AutoLoadWebXRInputSystem)
{
settings.AutoLoadWebXRInputSystem = false;
Debug.Log("Ubiq has set AutoLoadWebXRInputSystem to FALSE" +
" in the WebXR settings. This is to allow you to build" +
" for other platforms without including WebXR. If you" +
" would prefer to skip this check and prevent this" +
" behaviour, add the string UBIQ_DISABLE_WEBXRAUTOLOADOFF" +
" to your scripting define symbols.");
}
if (settings.AutoLoadWebXRManager)
{
settings.AutoLoadWebXRManager = false;
Debug.Log("Ubiq has set AutoLoadWebXRManager to FALSE" +
" in the WebXR settings. This is to allow you to build" +
" for other platforms without including WebXR. If you" +
" would prefer to skip this check and prevent this" +
" behaviour, add the string UBIQ_DISABLE_WEBXRAUTOLOADOFF" +
" to your scripting define symbols.");
}
#endif
ImportHelperXRI.Import();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"references": [
"GUID:fe685ec1767f73d42b749ea8045bfe43",
"GUID:a8b0ee606e2d3ea47a04b62a948d4604",
"GUID:bad2b0f10eaa41942a2cb9c40b7000d9"
"GUID:bad2b0f10eaa41942a2cb9c40b7000d9",
"GUID:fd4abe4ffe74ef1448afe15c6cb36bb7"
],
"includePlatforms": [
"Editor"
Expand Down
2 changes: 1 addition & 1 deletion Unity/ProjectSettings/EditorBuildSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ EditorBuildSettings:
serializedVersion: 2
m_Scenes:
- enabled: 1
path: Assets/Samples/Demo (XRI)/Demo.unity
path: Assets/Ubiq/Samples/Demo (XRI)/Demo.unity
guid: 2de505d34345ab340bdde30d419b24eb
m_configObjects:
Unity.XR.Oculus.Settings: {fileID: 11400000, guid: dd03e1831d6fe0d49b5543239e045d81,
Expand Down

0 comments on commit 84d2397

Please sign in to comment.