当前位置: 首页>>代码示例>>C#>>正文


C# SerializedProperty.ClearArray方法代码示例

本文整理汇总了C#中UnityEditor.SerializedProperty.ClearArray方法的典型用法代码示例。如果您正苦于以下问题:C# SerializedProperty.ClearArray方法的具体用法?C# SerializedProperty.ClearArray怎么用?C# SerializedProperty.ClearArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UnityEditor.SerializedProperty的用法示例。


在下文中一共展示了SerializedProperty.ClearArray方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: UpdateTransformMask

 public static void UpdateTransformMask(SerializedProperty transformMask, string[] refTransformsPath, string[] humanTransforms)
 {
   // ISSUE: object of a compiler-generated type is created
   // ISSUE: variable of a compiler-generated type
   AvatarMaskUtility.\u003CUpdateTransformMask\u003Ec__AnonStorey89 maskCAnonStorey89 = new AvatarMaskUtility.\u003CUpdateTransformMask\u003Ec__AnonStorey89();
   // ISSUE: reference to a compiler-generated field
   maskCAnonStorey89.refTransformsPath = refTransformsPath;
   transformMask.ClearArray();
   // ISSUE: object of a compiler-generated type is created
   // ISSUE: variable of a compiler-generated type
   AvatarMaskUtility.\u003CUpdateTransformMask\u003Ec__AnonStorey8A maskCAnonStorey8A = new AvatarMaskUtility.\u003CUpdateTransformMask\u003Ec__AnonStorey8A();
   // ISSUE: reference to a compiler-generated field
   maskCAnonStorey8A.\u003C\u003Ef__ref\u0024137 = maskCAnonStorey89;
   // ISSUE: reference to a compiler-generated field
   // ISSUE: reference to a compiler-generated field
   // ISSUE: reference to a compiler-generated field
   // ISSUE: reference to a compiler-generated field
   // ISSUE: reference to a compiler-generated field
   for (maskCAnonStorey8A.i = 0; maskCAnonStorey8A.i < maskCAnonStorey89.refTransformsPath.Length; maskCAnonStorey8A.i = maskCAnonStorey8A.i + 1)
   {
     // ISSUE: reference to a compiler-generated field
     transformMask.InsertArrayElementAtIndex(maskCAnonStorey8A.i);
     // ISSUE: reference to a compiler-generated field
     // ISSUE: reference to a compiler-generated field
     // ISSUE: reference to a compiler-generated field
     transformMask.GetArrayElementAtIndex(maskCAnonStorey8A.i).FindPropertyRelative("m_Path").stringValue = maskCAnonStorey89.refTransformsPath[maskCAnonStorey8A.i];
     // ISSUE: reference to a compiler-generated method
     bool flag = humanTransforms == null || ArrayUtility.FindIndex<string>(humanTransforms, new Predicate<string>(maskCAnonStorey8A.\u003C\u003Em__14A)) != -1;
     // ISSUE: reference to a compiler-generated field
     transformMask.GetArrayElementAtIndex(maskCAnonStorey8A.i).FindPropertyRelative("m_Weight").floatValue = !flag ? 0.0f : 1f;
   }
 }
开发者ID:BlakeTriana,项目名称:unity-decompiled,代码行数:32,代码来源:AvatarMaskUtility.cs

示例2: LoadQuests

    private void LoadQuests()
    {
        // Reset properties
        actProperty = serializedObject.FindProperty("act");
        sceneProperty = serializedObject.FindProperty("scene");
        questListProperty = serializedObject.FindProperty("questList");

        TextAsset[] questsList=ParleyMenu.GetActSceneQuests(ParleyMenu.GetActs()[actProperty.intValue],ParleyMenu.GetActsScenes()[ParleyMenu.GetActs()[actProperty.intValue]][sceneProperty.intValue]).ToArray();

        questListProperty.ClearArray();

        for (int x=0;x<questsList.Length;x++){
            questListProperty.InsertArrayElementAtIndex(x);
            questListProperty.GetArrayElementAtIndex(x).objectReferenceValue=questsList[x];
        }
    }
开发者ID:ChristianHoj,项目名称:home_nursing,代码行数:16,代码来源:ParleyEditor.cs

示例3: EncryptAndSetBytes

        private void EncryptAndSetBytes(string val, SerializedProperty prop, string key)
        {
            string encrypted = ObscuredString.EncryptDecrypt(val, key);
            byte[] encryptedBytes = GetBytes(encrypted);

            prop.ClearArray();
            prop.arraySize = encryptedBytes.Length;

            for (int i = 0; i < encryptedBytes.Length; i++)
            {
                prop.GetArrayElementAtIndex(i).intValue = encryptedBytes[i];
            }
        }
开发者ID:XactlyGa,项目名称:QuickQuiz,代码行数:13,代码来源:ObscuredStringDrawer.cs

示例4: ApplyOutlineChanges

 private static void ApplyOutlineChanges(SerializedProperty outlineSP, SpriteRect spriteRect)
 {
   outlineSP.ClearArray();
   for (int index1 = 0; index1 < spriteRect.m_Outline.Count; ++index1)
   {
     outlineSP.InsertArrayElementAtIndex(index1);
     SerializedProperty arrayElementAtIndex = outlineSP.GetArrayElementAtIndex(index1);
     arrayElementAtIndex.ClearArray();
     List<Vector2> vector2List = spriteRect.m_Outline[index1];
     for (int index2 = 0; index2 < vector2List.Count; ++index2)
     {
       arrayElementAtIndex.InsertArrayElementAtIndex(index2);
       arrayElementAtIndex.GetArrayElementAtIndex(index2).vector2Value = vector2List[index2];
     }
   }
 }
开发者ID:BlakeTriana,项目名称:unity-decompiled,代码行数:16,代码来源:SpriteEditorWindow.cs

示例5: CopyArrayToSerialized

 static void CopyArrayToSerialized( SerializedProperty dest, GameObject[] sources )
 {
     if( dest.arraySize != sources.Length )
     {
         dest.ClearArray();
         for( int i = 0; i < sources.Length; ++i )
         {
             dest.InsertArrayElementAtIndex( i );
         }
     }
     for( int i = 0; i < sources.Length; ++i )
     {
         if( dest.GetArrayElementAtIndex( i ).objectReferenceValue != sources[i] )
             dest.GetArrayElementAtIndex( i ).objectReferenceValue = sources[i];
     }
 }
开发者ID:InvitationToDeath,项目名称:InvitationToDeath-Ver3,代码行数:16,代码来源:ExporterWindow.cs


注:本文中的UnityEditor.SerializedProperty.ClearArray方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。