Is there any way to randomize the sprite variants directly between the points instead of selecting only one sprite variant for one point?
The only thing i could think of is making a lot of points and manually set different variants for each point to get a good random design but it’s heavily time consuming and resulting in a point overdose.
Hey there! Trying to use sprite shapes for super fast, yet still accurate prototyping, and so it would be nice to be able to snap to the grid by holding ctrl/cmd (or at least enable snapping through a shortcut).
In the same vein, it seems like snapping gets disabled often when moving the shape around with transform tools. Conversely, when moving control points without moving the whole shape with transform tools, the pivot ends up far away from the actual shape.
Could be user error on all accounts, but these are just some thoughts
Sprite Shape Renderer does not take its shape into account when rendering normal buffer for 2DLighting.
Also, probably related to the same issue, where if you scale the sprite negatively, that too… is not taken into account when rendering normal map buffer.
Rotating the actual sprite does seems to work however.
Hi, I am adding PolygonCollider2D to the sprite shape at runtime. The issue is, it does not gets updated on the same frame… is there a function to update on the same frame? BakeCollider or setting autoUpdateCollider before adding doesn’t work
Having a fundamental issue with sprite-shape, and wanted to see if there was maybe a work-around?
2D lighting doesn’t seem to effect the FILL texture at all, everything else it does fine with. Not exactly sure why this is, but I hope there’s a way around it, otherwise I’ll need to find an alternative to spriteShape.
Here’s a screenshot of my inspector, and a comparison of the same texture on a sprite shape and on a regular sprite.
SpriteShape Renderer is indeed supported by 2D URP. We will take a look asap. @jarbleswestlington_unity Could you kindly please submit a bug with this simple repro project that could help us validate this ?
Since the entire generation happens in a Job, Collider gets updated in the next frame.
However if you would like to force generation in the same frame, please make sure to call these functions in this order:
spriteShapeController.BakeMesh();
spriteShapeController.BakeCollider();
I’m experiencing something with sprite shapes that I can’t seem to find anyone else talking about and this one’s a head scratcher.
TLDR I’m trying to make an asteroids clone for practice. I’m using sprite shapes for the asteroid prefab and then moving the spline control points around on instantiation to give them all a randomized appearance. so far so good. however as the game progresses and I am instantiating more and more of these prefabs, frequently the game object is instantiated with all of its components disabled for apparently no reason and with no error thrown in the console. if I pause the game, and then manually check the boxes to turn the components back on, then unpause magically the prefabs manifest into existence and work like normal. seems to happen more frequently if I’m creating a lot of them at a time in the same frame.
I’m going to have to assume this is a bug or it’s by design but not throwing any warnings or errors (Is it a conflict with trying to create too many things in nearly the same place?)
side note: I would like to second the notion that the sprite sheet used for the textures could use the traditional nine tile orientation where the bottoms and sides face downwards and sideways respectively, rather than having to be oriented facing upwards
Hi, there is no reason why the Components are auto-disabled. Could you please post a repro/sample project or file a bug report with the project ? Will take a look asap.
Also as mentioned by @MelvMay , kindly start a new thread for the case if possible as its easier to follow and respond. Thanks.
heey, how do I get the Sprite Variant of a point specified by the code? I am replicating the behavior of editing the Sprite Shape at runtime and need to display the available sprite variants for the specific point I select.
Use SetSpriteIndex to set variant for a specific control-point.
Note, there are a few conditions such as the Tangent mode at the point etc for the variant to be actually set.