En: Please help to overload a function in C++
Ru: Пожалуйста, помогите перегрузить функции в C++
En: Please help to overload a function in C++
Ru: Пожалуйста, помогите перегрузить функции в C++
En: Overload is needed in C++, function overloading different incoming and outgoing data with preservation of function names.
Ru: Перегрузка нужна внутри на C++, перегрузка функций разными входящими и исходящими данными с сохранением имён функций.
You can’t overload a non-virtual method. Statics are non-virtual and cannot be made virtual. You’d need to add a new method that does what you want.
He’s 100% correct. Just create a non-static virtual function that FVector Clamp calls.
en: Probably we each other a little bit don’t understand, talking about the usual overload, which we can use in any program in C++ when writing any program, even without the UE.
In C++ there is such a thing that functions with the same name can accept different arguments and work as different functions, including the function that satisfies the incoming data.
I would like to have several functions with the name “Clamp”, working with different arguments.
ru: Наверное мы друг-друга немного не понимаем, речь о обычно перегрузке, которую мы можем использовать в любой программе на C++ при написании любой программы, даже без UE.
В C++ есть такая штука, что функции с одинаковым именем, могут принимать разные аргументы и работать как разные функции, включая ту функцию, которая удовлетворяет входящим данным.
Я хотел бы получить несколько функций с именем “Clamp”, работающими с разными аргументами.
PS: I value your answers.
You cannot overload UFUNCTION() like you can with raw C++ methods.
You can however add a prefix to each function and set their Display Name to be the same for all of them nodes.
Please, could you give an example of prefix.
I made the prefix on the direct meaning of this and got quite the expected result:
In fact, the engine comes with such features as:
: I have studied your work, I found the buttons in your signature.
Found that you use the “meta”!
I tried to use the same thing and voila:
You are my Saviour!) T4U!))
ru: проблема решена, используйте meta, как на картинке, для именования функций в движке.
Всё что есть в meta: UFUNCTION -> meta документация.