Closed FrancescoBis closed 1 month ago
You need add reproduce steps, expected result and actual result. Maybe upload text example, which illustrate problem in easy way.
You need add reproduce steps, expected result and actual result. Maybe upload text example, which illustrate problem in easy way.
Got it.
Expected result: The source texture of the ScriptedTexture should be replaced with the texture given as argument to ScriptedTexture.replaceTexture().
Actual result: The original source texture keeps getting drawn even if replaceTexture() was called with a different texture than the original source as argument.
Reproduce steps:
ScriptedTexture'ChosenScriptedTexture'.notifyActor = self;
simulated event renderTexture(ScriptedTexture scrTex) { scrTex.replaceTexture(tex); }
Can you provide simple cube test map with all actors embed into mylevel, please?
Also what about 436?
And Unreal wiki say next:
ReplaceTexture (Texture (UT) Tex) Copies the given texture on the ScriptedTexture's canvas. The given texture and the ScriptedTexture must have exactly the same size. Only image data is copied, not the texture's palette; if both palettes don't match, you'll get a pretty psychedelic effect.
It different from what you expect. And in source code, it just copy texture data, not set it as base. I guess if you need change base texture, you need set it in ScriptedTexture properties.
It simple non-const field: var() Texture SourceTexture;
.
Also what about 436?
And Unreal wiki say next:
ReplaceTexture (Texture (UT) Tex) Copies the given texture on the ScriptedTexture's canvas. The given texture and the ScriptedTexture must have exactly the same size. Only image data is copied, not the texture's palette; if both palettes don't match, you'll get a pretty psychedelic effect.
It different from what you expect. And in source code, it just copy texture data, not set it as base. I guess if you need change base texture, you need set it in ScriptedTexture properties.
It simple non-const field:
var() Texture SourceTexture;
.
It has always worked the way I expect on 436, indeed it works on the map I just created but only if resizing the window, I'll attach the map with this message. DM-replaceTexture_bug_1.zip
When the description you quoted says "copied" it means "copied and drawn", the palette is separated from the image as the images use indexed colors, but I don't mind about the palette not being copied.
ScriptedTexture.replaceTexture() doesn't replace the texture on 469d.