【環境】
・UE5.3
・M1 Mac 13.6
上のマクロでエラーがでます。
マクロライブラリに作成したものを読み込んでいます。
これはレベルブループリント上で見た目をスッキリさせるために作成したマクロです。
AやBに入力されるのはName型やPaperSprite型です。
数日前までは問題なく動いていたのですが、本日の開発中に何故かエラーが出るようになってしまいました。
どんな情報でも構いませんで解決できそうな情報がございましたらどうかご教示ください。
よろしくお願いします。
【環境】
・UE5.3
・M1 Mac 13.6
上のマクロでエラーがでます。
マクロライブラリに作成したものを読み込んでいます。
これはレベルブループリント上で見た目をスッキリさせるために作成したマクロです。
AやBに入力されるのはName型やPaperSprite型です。
数日前までは問題なく動いていたのですが、本日の開発中に何故かエラーが出るようになってしまいました。
どんな情報でも構いませんで解決できそうな情報がございましたらどうかご教示ください。
よろしくお願いします。
The problem is that you are using the wrong equal sign node
画像の一番上のコメントには「仕事はありません」と書かれています
画像の一番下のコメントには「はい、機能します」と書かれています
will not work top
will work bottom
I hope my translation i did comes through okay but to say it again fully typed out and not translated
The top comment in this attached picture shows essentially what you are doing and you can not use it as such
You have to use the lower comment shown in picture method for compare strings
in English computer system you right click and can type “= string” and see the different methods for compare string
I’m not sure actually how you managed to even make that macro, when i try it will not let me even connect it up with wildcard
書き込んでくれてありがとうございます。
比較したいのは文字列型ではありません。
Name型、PaperSprite型、SoundBase型、Text型などの様々な場合があります。それを一つのマクロで済ませたいのです。
Thank you for writing this.
I don’t want to compare string types.
There are various types such as Name, PaperSprite, SoundBase, Text, etc. I want to do it all with one macro.
You’ll have to create a branch statement of some kind or multiple macros
The fact is the engine does not allow it, it likely tells you why in more specifics in your language if you hover over the error or click the errors bellow
i either don’t understand exactly what you are doing above from the language differences
or your trying to break the rule / laws of the engine
Think of it like this
“A” = “A” = true
“A” = 5 = ? ( the engine does not automatically convert integer to string so this would fail )
“A” = DataTable = ??
“A” = other data format / structure = ???
“A” being a string in the example
my point being the engine is trying to stop you potentially comparing garbage data with no Boolean result able to be returned from said comparisons
You may make sure in your code that it’s always
string = string
number = number
data Table = data Table
other = other
The engine does not care, it is the possibility of it being the wildcard that it is trying to deny you as from the programs point of view it does not know what these wildcards are to write the function ( macro ) for it to essentially translate whatever you plug in to a true false value
“whatever you plug in” is an infinitely large function
where as if you say to the engine compare these strings
it knows what it’s comparing and the function is then only a few lines of code
Your best solution to make such a macro is to have one for each type of data you need
compare String
compare Bool
compare Numerical
etc etc
If you want one macro truly you’ll have to find a way for it to take the wildcard in, determine which card it is defining every type you plan to use
Boolean
Integer
PaperSprite
etc
This will hurt performance as it will have to check each of these branches every time the macro is called, not a problem if used a few times, but the more you use it the more you’ll notice the delay
ご意見を参考にして、上の画像の様に再設定すればエラーは出ませんでした。
変数型が違うだけの見た目の同じマクロを複数個作るのは精神衛生上良いわけではないですが、現状では他の方法は無いようです。
ご指南頂きありがとうございました。
I took your advice into consideration and reconfigured it as shown in the image above, and the error did not occur.
It’s not good for mental health to create multiple macros that look the same but have different variable types, but at the moment it seems there is no other way.
Thank you for your advice.
I can understand the frustration sorry to tell you it is a coding limitation
please mark as answer when you get the time
i once tried to fight the way pure nodes work myself guy had to beat me with metaphorical stick for me to see
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.