Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating components not working #255

Open
StatiS opened this issue Jun 20, 2019 · 2 comments
Open

Creating components not working #255

StatiS opened this issue Jun 20, 2019 · 2 comments

Comments

@StatiS
Copy link

@StatiS StatiS commented Jun 20, 2019

Im trying to create a custom component, as described in the wiki. This is on UE4 4.22.3, unreal.js from marketplace.

let Compile = function(x) {  
    return require('uclass')()(global, x);
}

class CustomComponent extends MeshComponent {
    ctor() { }

    properties() {
        this.X /*EditAnywhere+int*/;
    }
}

let CustomComponentClass = Compile(CustomComponent)

Running this code outputs:
Javascript: Warning: Create UClass(CustomComponent_C0) Elapsed: 0.000244

But CustomComponent_C0 doesnt show up in the list of available components when trying to add to anything.
It shows up in the list of classes to inherit from when making a new blueprint though, and if I use class flag BlueprintType, it shows up as a possible variable type in bps too, it just doesnt show when trying to add it as a component.

Further more, although this might just be my missunderstanding, as Im not sure if this is even supported, if I make a new blueprint and pick CustomComponent_C0 as its parent, ue4 crashes.
In the logs: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x000000c8

I also have a question, do javascript generated classes exist as actual files anywhere on the file system after being compiled?

As you can probably see, Im new to unreal.js and ue4, so I might just be misunderstanding things here. I appreciate your patience and answers in advance.

@StatiS

This comment has been minimized.

Copy link
Author

@StatiS StatiS commented Jun 20, 2019

Just tried with self built from source instead of martketplace version, with same results.

@crocuis

This comment has been minimized.

Copy link
Contributor

@crocuis crocuis commented Jul 8, 2019

Classes generated by Javascript do not exist as files, and it is not possible to inherit JavascriptGeneratedClass as a parent class in C ++ or Blueprint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.