Coder Social home page Coder Social logo

UObject.Find is not a function about unreal.js HOT 9 CLOSED

mflux avatar mflux commented on May 18, 2024
UObject.Find is not a function

from unreal.js.

Comments (9)

mflux avatar mflux commented on May 18, 2024

I switched back to UnrealJS.Prebuild.4.10-hotfix-20151127-1 and it appears to have fixed the issue. I assume something is wrong with the newer build?

from unreal.js.

nakosung avatar nakosung commented on May 18, 2024

I rebuilt and uploaded a new build, please check again with the new build. (Unfortunately there is no automated test yet)

from unreal.js.

mflux avatar mflux commented on May 18, 2024

Hi Nako, thanks for the new build. I've tried it again and am getting the same issue.

Is it something with my install that's incorrect? Content/Scripts should be in the Plugins folder, and then what else should be in my game's Content/Scripts folder?

from unreal.js.

nakosung avatar nakosung commented on May 18, 2024

There should be 'aliases.js' in GameContent/Scripts.

        Context.WriteAliases(Context.Paths[0] + 'aliases.js')

        Context.RunFile('aliases.js')
        Context.RunFile('polyfill/unrealengine.js')
        Context.RunFile('polyfill/timers.js')

:)

from unreal.js.

mflux avatar mflux commented on May 18, 2024

I do have that. One thing I noticed that was a source of confusion was that there are two Content/Scripts folders, one in the Plugin/UnrealJS and the other in Plugin/UnrealJS/Examples

screenshot 2016-03-03 17 26 23

What I did in the previous version was I copied the working example files in Content/Scripts folder to my project's Content/Scripts folder and then started building from there. Am I doing this correctly?

Where is this:

    Context.WriteAliases(Context.Paths[0] + 'aliases.js')

    Context.RunFile('aliases.js')
    Context.RunFile('polyfill/unrealengine.js')
    Context.RunFile('polyfill/timers.js')

Supposed to be?

from unreal.js.

mflux avatar mflux commented on May 18, 2024

I see now where the Context.RunFile is (bootstrap). However the aliases.js seem to be missing UObject.prototype.Find

UObject.prototype.Modify = UObject.prototype.ModifyObject;
UObject.prototype.ClearTimerbyFunctionName = UObject.prototype.K2_ClearTimer;
UObject.prototype.GetTimerElapsedTimebyFunctionName = UObject.prototype.K2_GetTimerElapsedTime;
UObject.prototype.GetTimerRemainingTimebyFunctionName = UObject.prototype.K2_GetTimerRemainingTime;
UObject.prototype.IsTimerActivebyFunctionName = UObject.prototype.K2_IsTimerActive;
UObject.prototype.IsTimerPausedbyFunctionName = UObject.prototype.K2_IsTimerPaused;
UObject.prototype.PauseTimerbyFunctionName = UObject.prototype.K2_PauseTimer;
UObject.prototype.SetTimerbyFunctionName = UObject.prototype.K2_SetTimer;
UObject.prototype.DoesTimerExistbyFunctionName = UObject.prototype.K2_TimerExists;
UObject.prototype.UnpauseTimerbyFunctionName = UObject.prototype.K2_UnPauseTimer;
UObject.prototype.ToString = UObject.prototype.Conv_ObjectToString;
UObject.prototype.Equal = UObject.prototype.EqualEqual_ObjectObject;
UObject.prototype.NotEqual = UObject.prototype.NotEqual_ObjectObject;
UObject.prototype.GetClass = UObject.prototype.GetObjectClass;

from unreal.js.

mflux avatar mflux commented on May 18, 2024

I've tried running HelloBlueprint example and that one is failing as well it seems.

screenshot 2016-03-03 18 02 58

from unreal.js.

mflux avatar mflux commented on May 18, 2024

Alright I was able to get it working again by reverting to the old unrealEngineClassId global method you had in an earlier uclass.js.

module.exports = function () {
    global.nextUnrealEngineClassId = global.nextUnrealEngineClassId || 0
    function fetchClassId() {
        return global.nextUnrealEngineClassId++
    }

And then...

        // get a classname
        let className = `${orgClassName}_C${fetchClassId()}`;

Instead of using the for loop and then testing UObject.Find, since that is unavailable through aliases. Hopefully we can get a correct fix for this at some point :)

from unreal.js.

nakosung avatar nakosung commented on May 18, 2024

Actually UObject.Find is exposed via JavascriptIsolate_Private.cpp. https://github.com/ncsoft/Unreal.js/blob/master/Plugins/UnrealJS/Source/V8/Private/JavascriptIsolate_Private.cpp#L1442 It isn't a javascript function, so it cannot be available if you have a right build.

from unreal.js.

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.