Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
11 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Rhylvin2015 · Jul 05, 2015 at 03:24 PM · 2dsprite2d gamechangespritesheet

how do I change a 2D Sprite Character Image/Graphic to another Sprite Character Image/Graphic with the same movements, animation,mechanim etc.

Hello, I have a 2D game kit that I bought and have been tinkering with it quite a bit. I'm no 2D expert, Im more of a 3D guy. anyway is it possible to change the 2d sprite character's image/graphics to something else? and if It is, how do I do about it without changing its mechanim or animation or movement etc.?

this is the original Sprite.

http://www.screencast.com/t/gS8GrbwP8

and this is the new one.

http://screencast.com/t/I9IdI5tK

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by CarterG81 · Jul 06, 2015 at 06:13 PM

I must be confused about the question. Otherwise, wouldn't this be as simple as changing the sprite in the SpriteRenderer?

http://docs.unity3d.com/ScriptReference/SpriteRenderer-sprite.html

 [SerializeField] Sprite newSprite;
 
 GetComponent<SpriteRenderer>().sprite = newSprite;

The animation will only effect this if the animation itself changes the Sprite in SpriteRenderer. (Which can be a problem that requires a different solution. Most likely not have any SpriteRenderer data (change) in the animation timeline itself).

You can also have animations on parents of sprites. What I do for all of my game entities is have a hierarchy like this:

 -NPC (A root gameObject that holds its children. May also hold AI scripts, character game Statistics (Strength/Health/Stamina/etc.)
 --Graphic (SpriteRenderer, Layer adjusting script, etc.)
 --Physics (BoxCollider, input interaction/response scripts, anything that deals with collision detection)

For complex graphics, I do the same thing.

  -NPC
  --GraphicParent
  ---Head
  ----Graphic
  ---Torso
  ----Graphic
  ---Larm
  ----Graphic
  ---Rarm
  ----Graphic
  ---Lleg
  ----Graphic
  ---Rleg
  ----Graphic

By animating the parent fo the Graphic (Head, Torso, Larm, Rarm, etc.) you don't ever move the graphic. So you can move the parent of the graphic.

I'm not thinking about this much, so it may not at all matter logically if you do this. (Is there even a benefit?) I mostly do this to organize my components in a way I can understand and interact with easier in the UnityEditor Hierarchy.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Rhylvin2015 · Jul 09, 2015 at 05:07 AM 0
Share

hey yeah actually its just as simple as changing the animation in the animator. I was afraid to try it since Im a begineer, and I though if it doesn't work, then im screwed since im not that smart in 2d

avatar image CarterG81 · Jul 10, 2015 at 07:51 PM 0
Share

awesome! glad you found your answer :)

avatar image
0

Answer by saberkhalili1 · Feb 28, 2017 at 07:43 AM

Your content is very informative Please see video below Expression and speech training http://mahanteymouri.ir/expression-art/

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image saberkhalili1 · Feb 27, 2017 at 07:45 AM 0
Share

Your content is very informative Please see video below Expression and speech training http://mahanteymouri.ir/expression-art/

avatar image
0

Answer by ariorahimi · Nov 05, 2021 at 12:02 PM

,how can i do it on my images in my website ? what program you suggest ? please check them: خرید پرده زبرا and پرده زبرا ساده

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

24 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Blur 2d Sprite 0 Answers

Changing sprites from spritesheet on collision. What am I doing wrong? 1 Answer

Change entire spriteSheet from animation tree 2 Answers

2d javascript How to change a sprite during runtime 1 Answer

How to truncate sprite without changing the scale of the sprite? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges