Unity3D课程学习笔记(一)

Unity3D课程学习笔记(一)

1.解释游戏对象(GameObjects)和资源(Assets)的区别与联系

官方文档对Assets的解释:An asset is representation of any item that can be used in your game or project. An asset may come from a file created outside of Unity, such as a 3D model, an audio file, an image, or any of the other types of file that Unity supports. There are also some asset types that can be created within Unity, such as an Animator Controller, an Audio Mixer or a Render Texture.

官方文档对GameObjects的解释:GameObjects are the fundamental objects in Unity that represent characters, props and scenery. They do not accomplish much in themselves but they act as containers for Components, which implement the real functionality.

解释区别与联系:对象一般是一些资源的集合体,是资源整合的具体表现,而资源可以被多个对象使用。游戏对象一般为玩家,敌人,环境等,而资源可组成游戏中所有的对象,一般包括声音,脚本,材质等,资源可以被多个对象使用,资源作为模版,可实例化游戏中具体的对象。

 

 

2.下载几个游戏案例,分别总结资源、对象组织的结构(指资源的目录组织结构与游戏对象树的层次结构)

   游戏:Beat-Plane:如下图所示结构,资源中可以放置图像、声音、脚本等。

 

 

3.编写一个代码,使用 debug 语句来验证 MonoBehaviour 基本行为或事件触发的条件

测试代码如下所示:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Test : MonoBehaviour {
	void Awake() {
		Debug.Log ("In Awake!");
	}

	// Use this for initialization
	void Start () {
		Debug.Log ("In Awake!");
	}
	
	// Update is called once per frame
	void Update () {
		Debug.Log ("In Update!");
	}

	void FixedUpdate() {
		Debug.Log ("In FixedUpdate!");
	}

	void LateUpdate() {
		Debug.Log ("In LateUpdate!");
	}

	void OnGUI() {
		Debug.Log ("In OnGUI!");
	}

	void OnDisable() {
		Debug.Log ("In OnDisable!");
	}

	void OnEnabl
  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值