Discover unity 2d sprite animation, include the articles, news, trends, analysis and practical advice about unity 2d sprite animation on alibabacloud.com
Author: Wang Xuan Yi, source: http://www.cnblogs.com/neverdie/Reprinted, Please keep this statement. If you like this article, click [recommendation ]. Thank you!
Introduction
The last time we talked about MonoBehaviour's past and present, we learned that every GameObjec in the game is controlled by a script. This time we started to use Sprite in Native 2D in Unity
new C # script and name it spriteoutline. The component will process updates to our materials in the editor and at run time, turn off or turn on contour effects, and change the outline color. You can also use this component in animations to enable or disable the outlines of specific animation frames or to change the outline color.usingUnityengine; [Executeineditmode] Public classSpriteoutline:monobehaviour { PublicColor color =Color.White; PrivateSpr
array to store all the small pictures.
Imagesource[] Frames =NewImagesource[10];
It is convenient for you to reuse them in the animation again and again.
Maybe you want to know when image's imageopened event was fired. I have tried, and find it occurs when you set image's source property:
Sprite. Source = bitmap;
If you don't believe it, please mark this sentence, and check if the method bitmap
Unity provides Chettu for the 2D Sprite, currently the latest version of the 5.2.2 offers three ways:
Automatic
Grid by Cell Size
Grid by Cell Count
According to the principle should be satisfied with a variety of plot, but if we have a pure and transparent elements of the diagram, and we need to take the map by number, then
Now it is time to introduce how to integrate a * algorithm into the sprite's 2D animation. If you follow my tutorial from the beginning, you will find it is easy.
First, I must introduce a new concept, map. map is the soul of the game, but now in my demo, it is simply a image control. let's add it in our game:
PrivateImageMap;
VoidInitmap () {map =NewImage() {Width = 800, Height = 600, source
2d game, the operation of the wizard needs, is often two points:
1, Static Wizard: General to do background display and so on
2, Sprite Animation: Frame animation, skeletal animation, etc.
Statement: Following the unity of the ope
vertices of the ankle, the weight affected by the calf bone is 50%, the weight affected by the foot bone is also 50%.In Unity3d, there are many skeletal animation plug-ins, such as UNI2D,SMOOTHMOVOE,PUPPET2D and so on, but in order to facilitate the art staff to edit our project use is spineSpine easy to get started, and it provides mesh, usually a texture only 4 vertices, left bottom right bottom left upper right, but with mesh, we can crawl this pi
the ankle, the weight affected by the calf bone is 50%, the weight affected by the foot bone is also 50%.In Unity3d, there are many skeletal animation plug-ins, such as UNI2D,SMOOTHMOVOE,PUPPET2D and so on, but in order to facilitate the art staff to edit our project use is spineSpine easy to get started, and it provides mesh, usually a texture only 4 vertices, left bottom right bottom left upper right, but with mesh, we can crawl this picture, and s
folder to hold the imported resources, the recommended import order is ". png" ". JSON" ". Atlas.txt", so that when the ". Atlas.txt" file is last imported, it is automatically generated Enemy_hunter_ Material.mat files and enemy_hunter_atlas.asset files.B: Right-click New "Spine skeletondata" type file, named "Enemy_hunter_skeletondata.asset", here combined with online information, feel the previous version, should be automatically generated, Do not know why this need to manually build this fi
finds a group of walking animations with 2D protagonists and imports the entire image into the project according to the method described above. As shown in, the walking animation of this group of characters takes four frames from the left.
Here I want to emphasize that we need to modify the color of the material so that it supports background transparency. For the color of the current material, we choose u
appears to be towardZThe axis is in the positive direction and upward isYaxis positive direction. In this mode, we can easily set the2Dscenes, Operations2Dobject. 650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/86/40/wKiom1e6XnvDLoJHAAnSGVPoqWg858.png-wh_500x0-wm_3 -wmp_4-s_4252522987.png "title=" Unity 2D Development (1) 2D3D project 713.png "alt=" Wkiom1e6xnvdlojhaansgvpoqwg858.png-wh_50 "/>Sc
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced. From the game development lab-Sun Guangdong
Sun Guangdong 2015.7.8
Some of the settings you make when you import a picture into unity often get a warning message. So check out these settings.
D:\Program files\unity5\editor\data\documentation\en\manual\class-textureimporter.html
Sprite (
Some of the settings you make when you import a picture into unity often get a warning message. So check out these settings.D:\Program files\unity5\editor\data\documentation\en\manual\class-textureimporter.htmlSprite (2D and UI)Select the texture texture to import into unity. The importsetting option that is displayed on the Inspector panel to be set.If your text
Unity 2D Game Development QuickStart 1th creating a simple 2D gameEven now, many novice game developers, when it comes to unity, still think unity can only be used to make 3D games. In fact, when Unity released its 4.3 release in
The camera tracking feature of Unity 2D game development TutorialIn the previous chapter, we created a simple 2D game. The sprite in this game has 3 states: idle, left, and right. This looks really cool! But the only 3 states limit the ability of the genie and the imaginary space of the game logic. It seems necessary t
Qt mobile app development (III): Use sprite images for Frame Animation
In the previous blog, we talked about the general support of Qt Quick for animation. Different types of animation can be combined with different interpolation functions to achieve almost all the animation
Unity3d Shaderlab Simulation Sprite AnimationIn the previous article, introduced through the shader simulation of the texture movement , then further, we can also put the frame animation of the sprite texture movement through the shader implementation. Although everyone is in the game script to do a higher level of control. But the money is wayward, code code can
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.