일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
Tags
- 빅 데이터
- Machine Learning
- 김양재 목사
- c++
- R
- 인공지능
- probability
- No SQL
- Big Data
- WebGL
- 통계
- data science
- 우리들교회
- nodeJS
- 데이터 과학
- 딥러닝
- Statistics
- node.js
- 김양재
- 빅데이타
- 확률
- openCV
- Artificial Intelligence
- 몽고디비
- 빅 데이타
- MongoDB
- 빅데이터
- 주일설교
- 김양재 목사님
- Deep learning
Archives
- Today
- Total
Scientific Computing & Data Science
Loading PNG Sequence 본문
JavaScript
==============================================================================
#pragma strict var imageCount : int = 0; var imageNameBase : String = ""; var imageNameZeroPadding : int = 0; var changeInterval : float = 0.06; var isRunning = false; var isLooping = false; private var texture : Texture = null; function PlayRocket () { isRunning = true; } function Start () { var isRunning = false; var fileName : String = imageNameBase + ZeroPad(0,imageNameZeroPadding); texture = Resources.Load(fileName); } function Update () { if( isRunning == true) { PNGAnimation (); } } function PNGAnimation () { var index : int = Time.time/changeInterval; index = index % imageCount; var fileName : String = imageNameBase + ZeroPad(index,imageNameZeroPadding); Resources.UnloadAsset(texture); texture = Resources.Load(fileName); renderer.material.mainTexture = texture; if ( index == imageCount-1){ Debug.Log("End of Animation"); Debug.LogWarning("End of Animation"); if( isLooping == false){ isRunning = false; } fileName = imageNameBase + ZeroPad(0,imageNameZeroPadding); Resources.UnloadAsset(texture); texture = Resources.Load(fileName); renderer.material.mainTexture = texture; } } function ZeroPad(number : int, size : int) { var numberString : String = number.ToString(); while (numberString.Length
C#
==============================================================================
// Load all textures into an array
Object[] textures = Resources.LoadAll("Textures", typeof(Texture2D));
// Load a single texture
Texture2D texture = Resources.Load("Texture") as Texture2D;
renderer.material.mainTexture = texture;
'CG & Video Games > Unity 3D' 카테고리의 다른 글
Unite Nordic 2013 Keynote (0) | 2013.05.26 |
---|---|
Putting the Power of Unitty In the Hands of Every Mobile Developer (0) | 2013.05.26 |
How to Play Animation Sequence in Unity (0) | 2013.05.26 |
Script for an Object Touched on Mobile Devices (0) | 2013.05.26 |
Script for an Object Clicked - an Alternative Method (0) | 2013.05.26 |
Comments