usingSystem.Collections;usingSystem.Collections.Generic;usingUnityEngine;publicclassTent:MonoBehaviour{publicCamera camera;// Start is called before the first frame updatevoidStart(){}// Update is called once per frame[System.Obsolete]voidUpdate(){SendUnityMessage();}/// <summary>/// 发送数据到Web端/// </summary>[System.Obsolete]publicvoidSendUnityMessage(){// 当前游戏对象的位置Vector3 worldPoint = transform.position;// 转换为屏幕位置Vector3 screenPoint = camera.WorldToScreenPoint(worldPoint);// w屏宽, h屏高, x位置, y位置Vector4 position =newVector4(Screen.width, Screen.height, screenPoint.x, Screen.height - screenPoint.y);// 发送到Web端Application.ExternalCall("updatePosition2Web", transform.gameObject.name, position);}/// <summary>/// 接收来自Web的传参/// </summary>/// <param name="message">传参信息</param>publicvoidReceiveWebMessage(string message){transform.position = Vector3.zero;Debug.Log(message);}}
1.什么是clang-tidy
clang-tidy is a clang-based C “linter” tool.
Its purpose is to provide an extensible framework for diagnosing
and fixing typical programming errors, like style violations,
interface misuse, or bugs that can be deduced via static an…