2
votes
Accepted
Any way to copy data into a component in another thread?
It's probably not the copying that's taking the time, but the updating of the rendered polygons and collision detection acceleration structures in response to the newly-copied data.
Since those ...
2
votes
Accepted
How to move an object when a specific event occurs?
I am not a fan of coroutines, because they make it hard to reason what actually goes on in the code. I prefer to use a pattern like this:
...
1
vote
Trying to generate a Tile labyrinth in Unity
It is a solid block of walls because you tell it to generate a solid block of walls.
...
1
vote
Animation of front and back part of a prefab separately on unity
I actually found how to do it by myself.
On the animation window, click on "Add property" > the name of the child object (in my case, frontpart) > "SpriteRenderer" > "...
1
vote
How to move an object when a specific event occurs?
Sounds like what you are looking for is Coroutines. Basically, you would write whatever code you want to execute in a function that returns IEnumerator, like this:
<...
1
vote
How to use Unity job system to do background work spanning multiple frames?
EDIT
The Jobs based answer below can work.
But for anyone who has use case I had (one expensive level generator algorithm to run in background rather than many parallel ones), just using Async/Await ...
1
vote
Efficient way to detect when audio clip ends
isPlaying will also return false if the song gets paused via. Pause.
Therefore I'd recommend waiting for the ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
unity × 15240c# × 5209
2d × 1032
animation × 630
physics × 616
shaders × 605
collision-detection × 489
android × 461
camera × 430
gui × 415
rotation × 405
3d × 373
movement × 315
unityscript × 308
sprites × 291
textures × 274
lighting × 225
blender × 223
rigidbody × 222
raycasting × 219
mathematics × 212
rendering × 211
input × 201
gameobject × 194
multiplayer × 176