Comments (8)
Use Assembly Definition file (.asmdef
), and reference the WebXR asmdef from there.
https://docs.unity3d.com/Manual/class-AssemblyDefinitionImporter.html
Right click on your script folder, Create Assembly Definition file, and in the "Assembly Definition References" section select the WebXR.asmdef
file.
Thanks
from unity-webxr-export.
Thanks, it works now
from unity-webxr-export.
I dont know much about assembly definitions but when i do this it fixes the errors but causes many of my other scripts to break/not connect with each other.
from unity-webxr-export.
@Lt23live it's a Unity issue, read more about assembly definitions and better ask in the relevant Unity forums. e.g. the Unity Scripting forum https://forum.unity.com/forums/scripting.12/
from unity-webxr-export.
@De-Panther thank you for the fast reply. The fact that this has its own definition it is most definitely locked out from the rest of Unity. It does make it extremely difficult to implement a usage of your SDK in my code base. Is there a reason this required its own Assembly?
from unity-webxr-export.
Sorry, but I don't want to repeat Unity's manual.
https://docs.unity3d.com/Manual/ScriptCompilationAssemblyDefinitionFiles.html
There are enough reasons there to why use it.
I can understand why it may be difficult for you to use it, but it's an essential part of Unity, all the packages of Unity are using it, and some of them are setting the "Auto Referenced" check to false, just like this package.
Better learn how to use it. Not for this package.
from unity-webxr-export.
I think I can see the appeal for speed recompilation but a framework such as this should never be self-contained because it would be referenced too much and used in conjunction with other plugins.
You say all of the packages are using it and I agree but somehow I am able to access them from the basic Assembly-CSharp scripts.
An alternate solution would be to copy the Editor and Runtime folder out of the Packages location, into the project somewhere (e.g. Assets/WebXR) and remove the package in the package manager. After that delete the .asmdef files from both the Editor and Runtime folders. After doing that I was able to access the files from Assembly-CSharp scripts.
This is an astounding plugin by the way! Great job.
from unity-webxr-export.
The solution should be to use asmdef in your project :)
If you want to edit stuff in the package, it would be simpler for you to copy the packages to the project Packages folder. There you can set "Auto Referenced" true in the asmdef files of the copied package.
You are able to use packages which are set to "Auto Referenced" true. It's not a good practice.
from unity-webxr-export.
Related Issues (20)
- Bring back Built-in Render Pipeline support, an option to disable the use of XR Display
- Issues when using TrackedPoseDriver of the Input System
- Change "WebXR Export requires Gamma Color Space" to a warning and not an error. HOT 5
- WebXR Export + Unity XR Interaction Toolkit - I can't get more than 45 FPS with oculus quest 3. HOT 9
- Microsoft Mixed Reality with WebXR HOT 7
- LogError in OnPostProcessAllAssets preventing build HOT 2
- UI Canvas doesn't showed when it is configured as [Screen Space - Camera/Screen Space - Overlay] in AR mode (Android) HOT 2
- WebXR Interactions 0.22.0 - Performance differences between samples scenes HOT 3
- Implement WebXR Layers
- Streching of the view and no stereo vision HOT 2
- One stretched view in XR mode on headsets in Unity 2022.3.21f1 HOT 1
- Left and Right camera in Quest 2 look like missed allign and VR effect is broken. HOT 10
- Bug : TypeError: Module.dynCall_viffffffff is not a function at Module.WebXR.Onstart at XRManager.animate at XRSession.tempRaf HOT 3
- Meshes not rendering at VR browser HOT 10
- Trigger and Grip button on Oculus did not working HOT 8
- Display AR and VR buttons in Unity Canvas HOT 4
- Screen orientation in AutoRotation mode doesn't work in AR Mode HOT 2
- Disable position tracking HOT 2
- Unity XR hands not appearing in build 0.22.0 HOT 11
- Oculus Quest 2 gets spinning Hourglass when loading WebXR project via Quest 2 Link. HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unity-webxr-export.