// // /*=============================================================================== // // Copyright (C) 2025 PhantomsXR Ltd. All Rights Reserved. // // // // This file is part of the Phantom.XRMOD.UnityFusion.Runtime.CodeHook. // // // // The VisionOSPlatform cannot be copied, distributed, or made available to // // third-parties for commercial purposes without written permission of PhantomsXR Ltd. // // // // Contact info@phantomsxr.com for licensing requests. // // ===============================================================================*/ using System; using System.Collections; using System.Reflection; namespace Phantom.XRMOD.UnityFusion.Runtime.CodeHook { public class ArrayAndGenericMixMakeSureAction : IBaseMakeSureValueAction { protected bool isGenericList; protected Array convertedArray; public virtual bool MakeSureValue(ref FieldInfo _fieldInfo, object _target, object _value) { if (!typeof(IList).IsAssignableFrom(_fieldInfo.FieldType) || _value is not Array tmp_Array) return false; convertedArray = tmp_Array; if (_fieldInfo.FieldType.GetGenericArguments().Length > 0) { isGenericList = true; } return true; } } }