but I got this error message:
Assets\Scripts\OrganOverlayController.cs(31,43): error CS0246: The type or namespace name ‘SpriteShapeRenderer’ could not be found (are you missing a using directive or an assembly reference?)
Does anyone know how to access this in scripts?
Be noted that it’s not SpriteRenderer, it’s SpriteShapeRenderer tho.
Thx a lot!
GetComponent() works fine on normal sprites, I guess Unity developers just forgot to add support for SpriteShapeRenderer.
Im just wondering if there is another way to do this.
Most of the new 2D stuff is in UnityEngine.U2D namespace.
If you’re using VisualStudio 2019+ you can right click on what it can’t find and it should allow you to add that namespace to the usings, it also gives you the option to create the class as well so watch out for that. There is also an automatic import option that will add the using for you. It was problematic when I was using it, adding in things I didn’t want.
Thank you so much, I searched all over the Internet and Unity documents and still cant find anything about this.
Im not getting the snippet since Im using vscode. Now Im considering moving to vs studio haha.