블로그 이미지
Every unexpected event is a path to learning for you.

카테고리

분류 전체보기 (2737)
Unity3D (817)
Script (91)
Extensions (14)
Effect (3)
NGUI (77)
UGUI (8)
Physics (2)
Shader (36)
Math (1)
Design Pattern (2)
Xml (1)
Tips (200)
Link (22)
World (1)
AssetBundle (25)
Mecanim (2)
Plugins (70)
Trouble Shooting (68)
Encrypt (7)
LightMap (4)
Shadow (4)
Editor (8)
Crash Report (3)
Utility (9)
UnityVS (2)
Facebook SDK (2)
iTween (3)
Font (11)
Ad (14)
Photon (2)
IAP (1)
Google (8)
Android (45)
iOS (41)
Programming (474)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (228)
협업 (58)
3DS Max (3)
Game (12)
Utility (136)
Etc (96)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (53)
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday
04-20 00:00

'Unity3D/Extensions'에 해당되는 글 14건

  1. 2014.01.12 Save Scene while on play mode
  2. 2014.01.12 Auto-Save Scene on Run
  3. 2013.01.17 Combine Children Extented (sources to share)
  4. 2012.11.24 SpriteManager


	// Simple editor Script that lets you save a scene while in play mode.
	// WARNING: All Undo posibilities are lost after saving the scene.

import UnityEditor; @MenuItem("Example/Save Scene while on play mode") static function EditorPlaying() { if(EditorApplication.isPlaying) { var sceneName : String = EditorApplication.currentScene; var path : String [] = sceneName.Split(char.Parse("/")); path[path.Length -1] = "Temp_" + path[path.Length-1]; var tempScene = String.Join("/",path); EditorApplication.SaveScene(tempScene); EditorApplication.isPaused = false; EditorApplication.isPlaying = false; FileUtil.DeleteFileOrDirectory(EditorApplication.currentScene); FileUtil.MoveFileOrDirectory(tempScene, sceneName); FileUtil.DeleteFileOrDirectory(tempScene); EditorApplication.OpenScene(sceneName); } }


출처 : http://docs.unity3d.com/Documentation/ScriptReference/EditorApplication-isPlaying.html

반응형

'Unity3D > Extensions' 카테고리의 다른 글

ObjectPool  (0) 2014.04.22
인스펙터 상의 GUI를 비활성화 시키고 싶을 때..  (0) 2014.04.02
Auto-Save Scene on Run  (0) 2014.01.12
Combine Children Extented (sources to share)  (0) 2013.01.17
SpriteManager  (0) 2012.11.24
Posted by blueasa
, |
Unity Crash

I’m sure it’s happened to every Unity developer with some frequency: You’re there working on something, totally in the flow and getting mad work done, and all of a sudden BAM! Unity crashes. Unfortunately for you, you’ve probably been so “in the zone” that you haven’t saved the last fifteen minutes or more of that work.

Yes, learning to press CTRL-S regularly is the most effective solution possible, but everyone forgets once in a while and the price for forgetting can sometimes be particularly high.

One thing that would help is if Unity could auto-save your scene for you, and there are a number of Unity editor extensions out there to help you, but it seems the majority of them are either more complicated than you need or don’t quite work right. That’s why I wrote the following script, which saves the current scene prior to entering Play mode when you press the Play button. It requires no configuration, and doesn’t distract you from the ultimately most important task of developing your game.  There are no editor windows to keep open, no menu options that need to be clicked.

If this sounds helpful to you, you can either copy the code below into a C# script file somewhere in an Editor folder in your project, or click the button below to download a zipped .unitypackage that can be easily imported into your project.


Download “AutoSave on Run Script”AutoSaveOnRun.zip – Downloaded 58 times – 2 kB

[code lang="csharp" toolbar="true" title="AutoSaveOnRun.cs"]
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;

using UnityEngine;
using UnityEditor;

[InitializeOnLoad]
public class AutoSaveOnRun
{

static AutoSaveOnRun()
{

EditorApplication.playmodeStateChanged = () =>
{

if( EditorApplication.isPlayingOrWillChangePlaymode && !EditorApplication.isPlaying )
{

Debug.Log( "Auto-Saving scene before entering Play mode: " + EditorApplication.currentScene );

EditorApplication.SaveScene();
EditorApplication.SaveAssets();
}

};

}

}
[/code]
I really do hope you find this as useful as I have!


출처 : http://www.daikonforge.com/dfgui/save-on-run/

반응형

'Unity3D > Extensions' 카테고리의 다른 글

ObjectPool  (0) 2014.04.22
인스펙터 상의 GUI를 비활성화 시키고 싶을 때..  (0) 2014.04.02
Save Scene while on play mode  (0) 2014.01.12
Combine Children Extented (sources to share)  (0) 2013.01.17
SpriteManager  (0) 2012.11.24
Posted by blueasa
, |

At first, sorry for my english. My teachers were Japanese
:lol:

As it is known, combining of the objects using one material in one mesh, strongly raises productivity. For this purpose in Standard Assets Unity there is script Combine Children (further: the Combine)
In the course of my work, some additives to a standard script of the Combine were created. And I share it:



[V] Frame To Wait: how many frames on script start to wait before to make combining.
For example, you have an object containing one hundred more other objects which too contain childs. Prefab of internal objects, it is equipped by the Combine with own customisations. On start, all of them will be combined and we will receive less meshes, but all the same a heap. Why not to Combine them again?
We put "1" in this setting and in a following frame, after end childs is combined, we stick together new received meshes again and it is received 5 - 10 meshes instead of old hundreds.
[V] Combine On Start - the script will work on composition start (if it is activated, sure).
[V] Destroy After Optimized - to kill all initial objects. Cautiously! If on these objects have colliders, they too are deleted.
[V] Cast Shadow - created mesh will cast shadow.
[V] Receive Shadow - created mesh will accept shadow.
[V] Keep Layer - the created object will save the same layer, as for the initial object (on which the script is)



Well and, a bonus!
[V] Under the right button there lives Combine Now command. That allows to spend all combination directly in the Editor, to estimate changes and, or to cancel them, or to save in the Scene. That is - to avoid necessity combining on application start.




combinechildren_962.cs



출처 : http://forum.unity3d.com/threads/37721-Combine-Children-Extented-(sources-to-share)

반응형

'Unity3D > Extensions' 카테고리의 다른 글

ObjectPool  (0) 2014.04.22
인스펙터 상의 GUI를 비활성화 시키고 싶을 때..  (0) 2014.04.02
Save Scene while on play mode  (0) 2014.01.12
Auto-Save Scene on Run  (0) 2014.01.12
SpriteManager  (0) 2012.11.24
Posted by blueasa
, |

SpriteManager

Unity3D/Extensions / 2012. 11. 24. 16:41

데모입니다. 축구공 이미지에 물리를 연결해서 제작한 데모입니다.

유니티에서 2D구현을 편하게하기 위해서, 버텍스 설정해서 텍스쳐 씌우고 하는 수작업보다는 그나마 좀더 편하게 사용할 수 있는 SpriteManager가 있습니다. 이거 만든 곳에서 SM2도 만들었는데, 그건 유료구요. 이건 제한없이 사용가능 합니다.

Sprite 조작 및 Animation 도 생성가능해서 2D게임 만드실 때 유용하게 사용하실 수 있습니다.

http://www.unifycommunity.com/wiki/index.php?title=SpriteManager - 유니티 위키입니다. SM에 대한 설명서가 있습니다.


http://www.3dbuzz.com - 메뉴보시면 Unity 메뉴눌러서 카테고리보시면 [Unity Standard] -> [SpriteManager & Unity] 보시면 강좌를 보실 수 있습니다. 이 강좌 결과물이 위 데모와 같습니다.(가입해야함)


위 데모 소스 입니다. (SpriteManager 포함)

SpriteMgr1_src.zip



출처 : http://kpro.tistory.com/63


반응형

'Unity3D > Extensions' 카테고리의 다른 글

ObjectPool  (0) 2014.04.22
인스펙터 상의 GUI를 비활성화 시키고 싶을 때..  (0) 2014.04.02
Save Scene while on play mode  (0) 2014.01.12
Auto-Save Scene on Run  (0) 2014.01.12
Combine Children Extented (sources to share)  (0) 2013.01.17
Posted by blueasa
, |