Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Create from usage for delegates

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
geno Posted - Oct 02 2019 : 2:28:47 PM
Hi,

I'd like to see support added for creating delegate declaration/implementation from usage. At least it looks like this is not supported at the moment.

Example:
PlayerInputComponent->BindAxis("MoveForward", this, &AMyCharacterBase::MoveForward);

The code highlighted in red is the delegate I'd like to create from usage using the Alt-Shift-Q shortcut.
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Oct 25 2019 : 1:03:25 PM
Thank you for explaining. It turns out that currently Create from Usage does not work correctly on function pointer parameters, which is something we are aware of, but I don't currently have an estimate for when this will be fixed:

case=58915

Of course, once this is fixed, it is still possible that Unreal Engine will complicate it further, but hopefully not.
geno Posted - Oct 23 2019 : 2:50:42 PM
Hi feline,

Sorry I wasn't clear about that.
It's Unreal C++ I'm talking about and the declaration you found seems to be the correct one.

In my example I wanted to bind an Action Input to a (new) delegate.
It would be useful if we could create the declaration and implementation from usage with all its glory sigature. I don't know if it's feasible though due to the complex nature of Unreal C++.

Cheers
feline Posted - Oct 04 2019 : 4:51:54 PM
Can you explain what you mean by a delegate in this case? I am assuming you are talking about C++, but a quick search to see what you are doing suggests 7 different ways of having a "delegate":

https://stackoverflow.com/questions/9568150/what-is-a-c-delegate

what is the declaration for the "BindAxis" function?

Is this the Unreal Engine function:

class UInputComponent
{
	template<class UserClass>
	FInputAxisBinding& BindAxis( const FName AxisName, UserClass* Object, typename FInputAxisHandlerSignature::TUObjectMethodDelegate< UserClass >::FMethodPtr Func )
}

or something else that just has a similar name?

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000