Giter Site home page Giter Site logo

Comments (6)

alexis-regnaud avatar alexis-regnaud commented on June 23, 2024

It's ok if I import with this syntax : import Unity from 'vue-unity-webgl'
But how import Message component ?

from vue-unity-webgl.

Rocher0724 avatar Rocher0724 commented on June 23, 2024

@alex83130
/node_modules/vue-unity-webgl/src/Unity.vue

I've done a lot about using messages and I'm still looking for them.
The only way I succeeded was when I used 'this.gameInstance.SendMessage' directly at the node_module address above. That is, when you wrote the code in the nodeModule.

I'm trying to do something in the .vue I'm writing, but the message is not yet successful.

If the @votetake sees this, please let me know how to use the messages. I've done almost everything.

from vue-unity-webgl.

alexis-regnaud avatar alexis-regnaud commented on June 23, 2024

Thanks @Rocher0724 ! But I would not like to write directly to the node_modules...

@votetake you have a solution to import the message object in my vue component and why the import in the readme no work for me ?

from vue-unity-webgl.

alexis-regnaud avatar alexis-regnaud commented on June 23, 2024
  • If I use :
    import { Unity, Message } from 'vue-unity-webgl'

I have no map and this error :

image

  • If I use :
    import Unity from 'vue-unity-webgl'

It's ok for the map but I haven't not access to the Message method

  • If I use :
    import { Message } from 'vue-unity-webgl'
    import  Unity from 'vue-unity-webgl/src/Unity'

It's ok for the map, but I have this error if I try to send a Message :

image

from vue-unity-webgl.

alexis-regnaud avatar alexis-regnaud commented on June 23, 2024

And in your "vue-unity-webgl/src/index.js", only the Unity object is export, and there is no export message object. Is it normal ?

from vue-unity-webgl.

vprime avatar vprime commented on June 23, 2024

I have a fix for this problem in my pull request #9

from vue-unity-webgl.

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.