Giter VIP home page Giter VIP logo

Comments (7)

hybridherbst avatar hybridherbst commented on May 13, 2024

Correct, that's a current limitation of our animation export. We're exporting animations using the KHR_animation_pointer extension, and that probably needs a special case for enabling/disabling of objects. Will look into it!

from needle-engine-support.

ROBYER1 avatar ROBYER1 commented on May 13, 2024

Ah, great! If onEnable/onDisable firing when the animation sets the gameobject itself active/inactive too that would be good as sometimes I would rely on onEnable/onDisable during animations

from needle-engine-support.

marwie avatar marwie commented on May 13, 2024

@ROBYER1 you can (as a workaround) declare this property on Needle Engine objects too. You are in javascript land after all 😅

Just add the following code somewhere in your scripts, that should do the trick:

Behaviour.prototype["m_Enabled"] = function(value) {
 this.enabled = value;
};

from needle-engine-support.

ROBYER1 avatar ROBYER1 commented on May 13, 2024

@ROBYER1 you can (as a workaround) declare this property on Needle Engine objects too. You are in javascript land after all 😅

Just add the following code somewhere in your scripts, that should do the trick:

Behaviour.prototype["m_Enabled"] = function(value) {
 this.enabled = value;
};

I'll be sure to try this!

from needle-engine-support.

marwie avatar marwie commented on May 13, 2024

I can also add it to our component in the next update until it's properly fixed in the exporter. But just so you know as it might not the last time 😅

from needle-engine-support.

marwie avatar marwie commented on May 13, 2024

Ah sorry I have to correct my comment above. In this case you have to declare it as a property. But it works the same way

Like this:

Object.defineProperty(Behaviour.prototype, "m_Enabled", {
    set: function m_Enabled(val: boolean) {
        this.enabled = val;
    },
    get: function m_Enabled(): boolean {
        return this.enabled;
    }
});

from needle-engine-support.

marwie avatar marwie commented on May 13, 2024

This should work in 2.20.0 pre now by default

from needle-engine-support.

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.