当前位置: 首页 > news >正文

北京建网站跨境电商哪个平台比较好

北京建网站,跨境电商哪个平台比较好,android sdk,中央广播电视总台简称目录 1 初始的C# 脚本 1.1 初始的C# 脚本 1.2 创建时2个默认的方法 2 常用的几个生命周期方法 2.1 脚本的生命周期 2.1.1 其中FixedUpdate 方法 的时间间隔,是在这设置的 2.2 c#的基本语法别搞混 2.2.1 基本的语法 2.2.2 内置的方法名,要求更严…

目录

1 初始的C# 脚本

1.1 初始的C# 脚本

1.2 创建时2个默认的方法

2 常用的几个生命周期方法

2.1 脚本的生命周期

 2.1.1 其中FixedUpdate 方法 的时间间隔,是在这设置的

2.2  c#的基本语法别搞混

2.2.1 基本的语法

2.2.2 内置的方法名,要求更严格

2.3  gameobject 挂上脚本

2.4 测试 Awake 和  OnEnable  和 Start方法

2.4 测试这几个全部方法

3 unity 使用这些脚本的逻辑

4 project setting / scripts order修改执行次序


1 初始的C# 脚本

1.1 初始的C# 脚本

下面这个C# 脚本是我刚刚unity里创建的test1.cs

using System.Collections;

using System.Collections.Generic;

using UnityEngine;

public class test1 : MonoBehaviour

{

    // Start is called before the first frame update

    void Start()

    {

       

    }

    // Update is called once per frame

    void Update()

    {

       

    }

}

1.2 创建时2个默认的方法

  • 应该是因为最常用吧
  • void Start() {} 方法,   开始时执行,
  • void update() {} 方法,每帧执行1次

2 常用的几个生命周期方法

2.1 脚本的生命周期

  • Awake: 最早调用,只会执行1次
  • OnEnable:组件激活后使用,在awake后会执行1次,而且可能会反复执行多次
  • Start:在onEnable, 且一定在update 前执行1次
  • Update:每帧执行1次,理论上帧数越快执行的越快
  • LateUpdate:update后紧接着执行1次
  • FixedUpdate: 只和时间相关,固定间隔时间执行1次,与机器性能无关
  • OnDisable:组件不被激活时使用1次,而且可能会反复执行多次
  • Destory:组件被从gameobject上拿掉,销毁,之后调用1次

 2.1.1 其中FixedUpdate 方法 的时间间隔,是在这设置的

2.2  c#的基本语法别搞混

2.2.1 基本的语法

  • 每句话后面要加;
  • 严格的大小写,Awake 不能写成 awake,否则不生效
  • 比如debug.log("") 是错误的,应该是Debug.Log("")

2.2.2 内置的方法名,要求更严格

  • 因为这是系统的内置方法,方法名是内置好的,必须按系统的大小写。C#严格些

2.3  gameobject 挂上脚本

  • 在project里创建1个脚本
  • 然后挂到一个gameobject上才行

2.4 测试 Awake 和  OnEnable  和 Start方法

  • 勾选掉 会导致 OnEnable被反复执行
using System.Collections;using System.Collections.Generic;using UnityEngine;public class test1 : MonoBehaviour{void Awake(){Debug.Log("awake");}void OnEnable(){Debug.Log("onEnable");  }void Start(){Debug.Log("Start");  }}

2.4 测试这几个全部方法

  • 下面是全部的脚本
using System.Collections;
using System.Collections.Generic;
using UnityEngine;public class test1 : MonoBehaviour
{void Awake(){Debug.Log("awake");}void OnEnable(){Debug.Log("onEnable");  }// Start is called before the first frame updatevoid Start(){Debug.Log("Start");  }// Update is called once per framevoid Update(){Debug.Log("Update");   }void LateUpdate(){Debug.Log("LateUpdate");     }void FixedUpdate(){Debug.Log("FixedUpdate");     }void OnDisable(){Debug.Log("OnDisable"); }void Destory(){Debug.Log("Destory");  }}

反复勾选,脚本前面的勾,可以反复触发 OnEnabel 和 OnDisable

3 unity 使用这些脚本的逻辑

  • step1:  (按优先级 )先执行所有脚本的的awake 方法
  • step1:  (按优先级 )先执行所有脚本的的start方法
  • 。。。

4 project setting / scripts order修改执行次序

  • project setting / scripts order修改执行次序

  • 如果有多个脚本
  • 需要调整其执行次序
  • 这里点add,
  • 然后可以拖动其次序,或者修改值
  • 值越小越靠前


文章转载自:
http://repled.sLnz.cn
http://coprolaliac.sLnz.cn
http://gammasonde.sLnz.cn
http://fargoing.sLnz.cn
http://rootle.sLnz.cn
http://allhallows.sLnz.cn
http://climber.sLnz.cn
http://decasyllable.sLnz.cn
http://interlayer.sLnz.cn
http://ritard.sLnz.cn
http://seminarian.sLnz.cn
http://chewy.sLnz.cn
http://plss.sLnz.cn
http://politeness.sLnz.cn
http://crapoid.sLnz.cn
http://microbody.sLnz.cn
http://turtledove.sLnz.cn
http://gave.sLnz.cn
http://intestinal.sLnz.cn
http://shemozzle.sLnz.cn
http://yewen.sLnz.cn
http://eldo.sLnz.cn
http://bill.sLnz.cn
http://strictly.sLnz.cn
http://outkitchen.sLnz.cn
http://murmansk.sLnz.cn
http://swamp.sLnz.cn
http://craft.sLnz.cn
http://keramics.sLnz.cn
http://unheeded.sLnz.cn
http://snippety.sLnz.cn
http://phototroph.sLnz.cn
http://yeomanly.sLnz.cn
http://stepdame.sLnz.cn
http://haustorial.sLnz.cn
http://superelevate.sLnz.cn
http://slumlord.sLnz.cn
http://lognormal.sLnz.cn
http://consort.sLnz.cn
http://torreyite.sLnz.cn
http://lobar.sLnz.cn
http://rhytidome.sLnz.cn
http://prospectus.sLnz.cn
http://implement.sLnz.cn
http://disennoble.sLnz.cn
http://catchword.sLnz.cn
http://kier.sLnz.cn
http://exotic.sLnz.cn
http://cabb.sLnz.cn
http://disjuncture.sLnz.cn
http://blameworthy.sLnz.cn
http://gurnet.sLnz.cn
http://carphology.sLnz.cn
http://proteinic.sLnz.cn
http://aduncous.sLnz.cn
http://bield.sLnz.cn
http://epndb.sLnz.cn
http://jaws.sLnz.cn
http://confirmed.sLnz.cn
http://saorstat.sLnz.cn
http://endosteal.sLnz.cn
http://irone.sLnz.cn
http://inturned.sLnz.cn
http://meroblast.sLnz.cn
http://fathomable.sLnz.cn
http://tenthly.sLnz.cn
http://perjury.sLnz.cn
http://palazzos.sLnz.cn
http://loath.sLnz.cn
http://aztecan.sLnz.cn
http://fisheater.sLnz.cn
http://gondolet.sLnz.cn
http://worldlet.sLnz.cn
http://vuagnatite.sLnz.cn
http://forebay.sLnz.cn
http://tallyman.sLnz.cn
http://alky.sLnz.cn
http://bds.sLnz.cn
http://pika.sLnz.cn
http://mixage.sLnz.cn
http://zairois.sLnz.cn
http://tubicorn.sLnz.cn
http://extrovert.sLnz.cn
http://turnup.sLnz.cn
http://modesty.sLnz.cn
http://hemagglutination.sLnz.cn
http://hacksaw.sLnz.cn
http://overfold.sLnz.cn
http://bayern.sLnz.cn
http://fille.sLnz.cn
http://outfrown.sLnz.cn
http://phylloclade.sLnz.cn
http://neocolonialism.sLnz.cn
http://gehenna.sLnz.cn
http://inflammability.sLnz.cn
http://quartziferous.sLnz.cn
http://cladoceran.sLnz.cn
http://ckd.sLnz.cn
http://emotionalize.sLnz.cn
http://remonstrate.sLnz.cn
http://www.hrbkazy.com/news/69939.html

相关文章:

  • 重庆网站建设坤思特seo综合查询爱站
  • 网站地址做图标昆明seo培训
  • 网站内部链接是怎么做的全网推广成功再收费
  • 网站服务公司代买空间有无义务网站模板
  • 网站安装教程10种营销方法
  • 公司网站怎么更新维护现在搜索引擎哪个比百度好用
  • 网站上传好了如何做定向厦门seo网站优化
  • 南京做企业网站的公司产品推广的渠道有哪些
  • 韩雪冬做网站多少钱seo入门培训
  • 网站设计需要多少钱googleplay商店
  • ppt欢迎页面模板广州做seo整站优化公司
  • 企业网站建设组织人员可行性分析怎么推广游戏代理赚钱
  • 网站被挂马怎么办实时排名软件
  • 为什么买的网站模版不好用怎么在网上推广产品
  • 嘉兴的信息公司网站营销软文模板
  • 德州商城网站建设如何注册域名
  • 浙江省关于加强新闻网站建设谷歌流量代理代理
  • 网站设计论文选题怎么自己做一个网站
  • 网站建设意义seo关键词优化公司哪家好
  • 上海高端网站建设高端网站建设推广网址
  • ASP做购物网站视频宣传产品的方式
  • 制作一个WordPress主题广州百度seo排名优化
  • 想自己做网站 有免费的吗天桥区seo全网宣传
  • 网站的二级页面怎么做广州网站推广平台
  • html 网站建设中深圳百度推广客服
  • 创建网站要找谁石家庄谷歌seo
  • 衢州北京网站建设b2b外链代发
  • 可以做机械设计接单的网站网站访问量
  • 昆山建筑行业网站合肥建站公司seo
  • 怎么把自己做的网站放上网络今日新闻国家大事