mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
Init TEngine4.0.0
Init TEngine4.0.0
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// 防止裁剪引用。
|
||||
/// <remarks>如果在主工程无引用,link.xml的防裁剪也无效。</remarks>
|
||||
/// </summary>
|
||||
public class DisStripCode : MonoBehaviour
|
||||
{
|
||||
private void Awake()
|
||||
{
|
||||
//UnityEngine.Physics
|
||||
RegisterType<Collider>();
|
||||
RegisterType<Collider2D>();
|
||||
RegisterType<Collision>();
|
||||
RegisterType<Collision2D>();
|
||||
RegisterType<CapsuleCollider2D>();
|
||||
|
||||
RegisterType<Rigidbody>();
|
||||
RegisterType<Rigidbody2D>();
|
||||
|
||||
RegisterType<Ray>();
|
||||
RegisterType<Ray2D>();
|
||||
|
||||
//UnityEngine.Graphics
|
||||
RegisterType<Mesh>();
|
||||
RegisterType<MeshRenderer>();
|
||||
|
||||
//UnityEngine.Animation
|
||||
RegisterType<AnimationClip>();
|
||||
RegisterType<AnimationCurve>();
|
||||
RegisterType<AnimationEvent>();
|
||||
RegisterType<AnimationState>();
|
||||
RegisterType<Animator>();
|
||||
RegisterType<Animation>();
|
||||
|
||||
#if UNITY_IOS || PLATFORM_IOS
|
||||
/*
|
||||
// IOSCamera ios下相机权限的问题,用这种方法就可以解决了 问题防裁剪。
|
||||
foreach (var _ in WebCamTexture.devices)
|
||||
{
|
||||
}
|
||||
*/
|
||||
#endif
|
||||
}
|
||||
|
||||
private void RegisterType<T>()
|
||||
{
|
||||
#if UNITY_EDITOR && false
|
||||
Debug.Log($"DisStripCode RegisterType :{typeof(T)}");
|
||||
#endif
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cfc34c9132d650b499fc6f146e1e11f6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user