- 1. 2016-5-14
- 1.1. make 2d object glow when event fires
- 1.2. change opacity of GameObject
- 1.3. change opacity or something else frame by frame.
- 1.4. unity not support C# 6.0?
- 1.5. call function in another script of another gameobject
- 1.6. how to edit prefab?
- 1.7. MouseDown event not fire?
- 1.8. MouseDown event not fire after add one statement inside another object.
- 1.9. replace texture from jpg to png
- 1.10. replace pure color backgrounds as transparent?
- 1.11. move object gradually?
- 1.12. error “no model is available for preview” when previewing animation
- 1.13. make health bar in unity3d 5 (which is using new GUI system)
- 2. 2016-5-6
- use shader to calculate glow shadow (very complex)
- visible/invisible or change color of a substrate/glow layer
[GameObject].SetActive(false); another way is to disable renderer of that object.
Use animation. Don’t use code.
Yes, only C# 4.0 supported.
Just use the type of that script as a field, and bind with the gameobject which has this type of script as component.
Some things you can add by clicking on the prefab and adding items using the Component menu. For more involved changes, drag the prefab into the scene, make whatever changes are necessary (ignore the message about breaking the prefab link), and when done, select Apply Changes to Prefab from the GameObject menu. Then delete the prefab from the scene.
Need Box Collider to detect this type of event.
Didn’t find why, however, set location at
Start() workaround this issue, maybe it’s a bug.
So far as I know, no way.
No way, do it in an image processing software.
- Use iTween
startPoint = CrewControl.transform.position;
startTime = Time.time;
endPoint = this.transform.position;
if (Time.time - startTime < duration)
CrewControl.transform.position = Vector3.Lerp(startPoint, endPoint, (Time.time - startTime) / duration);
Drag and drop the model source file into the animation preview window.
Add image inside panel, change its anchor to left (hold shift key), change scale programmatically
Edit -> Project Settings -> Editor. Set Version Control to meta files. Set Asset Serialization to force text.
Detail can be found in editor.log located under C:\Users\xxx\AppData\Local\Unity\Editor\Editor.log Identified as a bug in community forum. Workaround is restart.
Found it may because last VS start failed and not close properly. Kill it in task manager first and try again.
To add a level to the build settings use the menu
I add an empty game object. I attach my new script.
public void NextLevelButton(string levelName)
I associate this game object with my new script to the Button(in the inspector) by: Clicking the +(plus) button to add a callback from an object->script->method.
get Renderer and change its
material.color when OnMouseEnter/Over/Exit event
Refer to http://docs.unity3d.com/ScriptReference/MonoBehaviour.OnMouseEnter.html