摘要:
OnCollisionEnter的触发条件:1、都有boxcollider组件并且IsTrigger为false2.主动碰撞的物体要有非运动学刚体组件,被动碰撞的物体有木有都行3.如果主动碰撞的物体有运动学刚体,被动碰撞物体一定要有非运动学的刚体组件OnTriggerEnter1、都有boxcoll... 阅读全文
摘要:
Mesh mesh = 坦克.GetComponent().mesh;Vector3[] vertices = mesh.vertices;foreach(vertices v in vertices ) {v += new Vector3(要移动的距离)}mesh.vertices = verti... 阅读全文
摘要:
首先 写个打包成Assetbundle的脚本 放在Editor下using UnityEngine;using System.Collections;using UnityEditor;public class NewBehaviourScript :ScriptableObject{ [Me... 阅读全文
摘要:
1 using UnityEngine; 2 using System.Collections; 3 4 public class NewBehaviourScript : MonoBehaviour { 5 private RaycastHit info; 6 LayerMas... 阅读全文
摘要:
using UnityEngine;using System.Collections;public class ins1 : M... 阅读全文
摘要:
现在 正在做unity的方向 不得不说我选的是UI方向 Unity中很有名的就是NGUI插件了.今天做了个ngui的简单背包系统。非常简陋。。初学着 自己mark下(1)预览主要就是个 simple popup list控件(为label制作动态字体方便支持中文)设置如图mark为空物体,作为动态生... 阅读全文