Unity
未读参加Unity开发比赛用的,多平台会有不同的启动参数。
所有启动参数将存储在变量(数组)“arguments”中。
1string[] arguments = Environment.GetCommandLineArgs();
Unity
未读代码DontDestroyOnLoad.cs1234567891011121314151617181920212223242526272829303132333435363738394041using System.Collections;using System.Collections.Generic;using UnityEngine;/// <summary>/// 加载场景时不删除的物体/// </summary>public class DontDestroyOnLoad : MonoBehaviour{ //加载场景时不销毁的物体 public GameObject[] DontDestroyObjects; //是否已经存在DontDestroy的物体 private static bool isExist; //------------------------------------------------------------------------------- void Awake() ...
Unity
未读代码IOSManager.cs123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125using UnityEngine;using System.Collections;using UnityEngine.SocialPlatforms;using UnityEngine.SocialPlatforms.GameCenter;public class IOSManager : MonoBehaviour { public bool GameCenterState; public string user ...
Unity
未读报错主要内容tundra: error: Failed to open file “xxxx/Library/Il2cppBuidCache/…..”
解决步骤已在图中说明
怕再次遗忘,故做下此笔记。
解决前
熟人的游戏,自己的解决前没截图,凑合下:)
解决后
解决步骤已在图中说明
代码ShakeCamera.cs12345678910111213141516171819202122232425262728using System.Collections;using System.Collections.Generic;using UnityEngine;public class ShakeCamera : MonoBehaviour{ private Vector3 shakePos = Vector3.zero; // Use this for initialization void Start() { } // Update is called once per frame /// <summary> /// 按住空格键,画面会一直抖动;松开按键,抖动结束 /// </summary> void Update() { if(Input.GetKey(KeyCode.Space)) { ...