random set Material issue

Summary

I want to change the timing of set material with Sleep, but it doesn’t work well.
Please let me know if there is a solution.

Please select what you are reporting on:

Creative

What Type of Bug are you experiencing?

Verse

Steps to Reproduce

_

Expected Result

_

Observed Result

Shift the timing of set material with Sleep

Platform(s)

UEFN

Upload an image



Hi, I’m looking into this.

Could you describe what you want to happen vs. what is happening, just so I can be sure I’m investigating the right thing?

1 Like

Hi,Samvangelist.
Thank you for looking into this.

I want to do the following loop:

Each creative_prop.Show()

Each creative_prop shows for several seconds using Sleep()

Each creative_prop.SetMaterial(flicker_material) ←warning before hide a creative_prop

Each creative_prop.Hide()

Each creative_prop hides for several seconds using Sleep()

Each creative_prop.Show()

I could produce a verse device if only one creative_prop.
I want to have multiple creative_props on one verse device.
Because it’s so manageable.

I know this is very complicated, and it may be difficult for you to understand what I’m trying to do.
If it’s impossible, I give up.

That makes sense - so you’re spawning a loop per creative_prop, using sleep to delay, then modifying their material settings and visibility in a series of steps.

Is the issue that it’s not working or not working as expected?

I can see the assets disappearing, reappearing and changing material settings in the video, albeit not in sync with one another That said, It looks like all of the materials are switching at the same time, vs per instance, which I assume is not what you want :slight_smile:

The issue is not working as expected.

I want the timing of the flicker to be off if the value of RandomSleep is different.
But I am having trouble because the timing of flickering is the same.

I want to do something like this video.

Ah, ok.

I think the issue here is that the switch is being set on the material for all the meshes, vs. being set on an instance of that material per mesh. I don’t believe dynamic material instances are currently supported in Verse but I could be wrong, will go check.

If possible, could you please make a simple code or a complex code that works like this video?

@Yoshiyuki_101 Assuming this is the entire code and flicker_material is not referenced somewhere else you could just move these lines into the “Flicker” function so it makes a new material instance per prop, also from what I see you don’t need to have “index” as a parameter on the “Flicker” function since it’s not being used anywhere

3 Likes

Thank you so much, Mineblo.
That’s the PERFECT ANSWER!
What I wanted to do worked!

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.