This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.XR.iOS; | |
public class BlendShapeObjectSwitcher : MonoBehaviour { | |
private static float THRESHOLD = 0.4f; | |
bool enabled = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class ExampleClass : MonoBehaviour | |
{ | |
public string url = "https://docs.unity3d.com/uploads/Main/ShadowIntro.png"; | |
IEnumerator Start() | |
{ | |
Texture2D tex; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Experimental.XR; | |
using UnityEngine.UI; | |
using UnityEngine.XR.ARFoundation; | |
[RequireComponent(typeof(Light))] | |
public class LightEstimation : MonoBehaviour | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Shader targeted for low end devices. Single Pass Forward Rendering. | |
Shader "Custom/Shadows Only" | |
{ | |
// Keep properties of StandardSpecular shader for upgrade reasons. | |
Properties | |
{ | |
_Alpha("Shadow Alpha", float) = 0.5 | |
// Blending state |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef LIGHTWEIGHT_SIMPLE_LIT_PASS_INCLUDED | |
#define LIGHTWEIGHT_SIMPLE_LIT_PASS_INCLUDED | |
#include "Packages/com.unity.render-pipelines.lightweight/ShaderLibrary/Lighting.hlsl" | |
#include "Packages/com.unity.render-pipelines.lightweight/ShaderLibrary/Shadows.hlsl" | |
struct Attributes | |
{ | |
float4 positionOS : POSITION; | |
float3 normalOS : NORMAL; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This is based on a shader from https://alastaira.wordpress.com/2014/12/30/adding-shadows-to-a-unity-vertexfragment-shader-in-7-easy-steps/ | |
Shader "Custom/MobileARShadow" | |
{ | |
SubShader { | |
Pass { | |
// 1.) This will be the base forward rendering pass in which ambient, vertex, and | |
// main directional light will be applied. Additional lights will need additional passes | |
// using the "ForwardAdd" lightmode. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Custom/MobileOcclusion" | |
{ | |
SubShader { | |
Pass { | |
// Render the Occlusion shader before all | |
// opaque geometry to prime the depth buffer. | |
Tags { "Queue"="Geometry" } | |
ZWrite On | |
ZTest LEqual |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Unlit/FeatheredPlaneShader" | |
{ | |
Properties | |
{ | |
_MainTex ("Texture", 2D) = "white" {} | |
_TexTintColor("Texture Tint Color", Color) = (1,1,1,1) | |
_PlaneColor("Plane Color", Color) = (1,1,1,1) | |
} | |
SubShader | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Set common variables for your Unity project, Replace these with your editor and project path | |
UNITY_PATH="/Applications/Unity/Hub/Editor/6000.1.0b8/Unity.app/Contents/MacOS/Unity" | |
PROJECT_PATH="/Users/dan/Documents/UnityRepos/Crossplatform_MR_GDC2025" | |
BUILD_OUTPUT_DIR="/Users/dan/Documents/UnityRepos/Crossplatform_MR_GDC2025/Builds" | |
BUILD_PROFILE_QUEST="Assets/Settings/Build Profiles/MetaQuest.asset" | |
BUILD_PROFILE_ANDROIDXR="Assets/Settings/Build Profiles/AndroidXR.asset" | |
BUILD_PROFILE_VISIONOS="Assets/Settings/Build Profiles/visionOS.asset" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.XR.ARFoundation; | |
using System.Collections.Generic; | |
using TMPro; | |
using UnityEngine.Android; | |
#if UNITY_VISIONOS | |
using UnityEngine.XR.VisionOS; | |
#endif | |
public class XRPermissions : MonoBehaviour |
OlderNewer