Giter Site home page Giter Site logo

Comments (8)

De-Panther avatar De-Panther commented on May 10, 2024 1

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.

abuti-shuti avatar abuti-shuti commented on May 10, 2024 1

Thanks, it works now

from unity-webxr-export.

Lt23live avatar Lt23live commented on May 10, 2024

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.

De-Panther avatar De-Panther commented on May 10, 2024

@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.

Lt23live avatar Lt23live commented on May 10, 2024

@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.

De-Panther avatar De-Panther commented on May 10, 2024

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.

Lt23live avatar Lt23live commented on May 10, 2024

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.

De-Panther avatar De-Panther commented on May 10, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.