We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I tried the following code but the component is not editable:
let Compile = function(x) { return require('uclass')()(global, x); } class CustomComponent extends MeshComponent { ctor() { } properties() { } } let CustomComponentClass = Compile(CustomComponent) class CustomActor extends Actor { ctor() { console.log("CustomActor ctor") this.Root = SceneComponent.CreateDefaultSubobject("ActorRootComponent") this.SetRootComponent(this.Root) this.CustomComponent = CustomComponentClass.CreateDefaultSubobject("CustomComponent") this.CustomComponent.AttachTo(this.Root) } properties() { this.CustomComponent /*EditableAnywhere+Category:Javascript:CustomComponent*/; } } const CustomActorClass = Compile(CustomActor) function initialize() { global.World = Engine.GetEditorWorld() global.CustomActor = new CustomActorClass(global.World, { X: 0 }) return function () { $execEditor(function () { if(global.CustomActor.IsValid()) { global.CustomActor.DestroyActor(); } }) } } module.exports = function () { let bye let alive = true process.nextTick(function () { if (!alive) return bye = initialize() }) return _ => { alive = false if (bye) { bye() } } }
I would like the component to be editable in order to change the materials applied to it.
Is it possible to change the Object Flags at runtime, or elsewhere (outside the properties() function)?
The text was updated successfully, but these errors were encountered:
https://answers.unrealengine.com/questions/162087/component-add-in-c-edit-in-blueprint.html
class CustomComponent extends MeshComponent { ctor() { } properties() { this.X /*EditAnywhere+int*/; } } let CustomComponentClass = Compile(CustomComponent) class CustomActor extends Actor { ctor() { console.log("CustomActor ctor") this.Root = SceneComponent.CreateDefaultSubobject("ActorRootComponent") this.SetRootComponent(this.Root) this.CustomComponent = CustomComponentClass.CreateDefaultSubobject("CustomComponent") this.CustomComponent.AttachTo(this.Root) } properties() { this.Root /*VisibleAnywhere+BlueprintReadOnly+SceneComponent*/; this.CustomComponent /*VisibleAnywhere+BlueprintReadOnly+MeshComponent*/; } }
Sorry, something went wrong.
Copied to wiki (https://github.com/ncsoft/Unreal.js/wiki/Creating-an-component)
No branches or pull requests
I tried the following code but the component is not editable:
I would like the component to be editable in order to change the materials applied to it.
Is it possible to change the Object Flags at runtime, or elsewhere (outside the properties() function)?
The text was updated successfully, but these errors were encountered: