ClothSerializeData2

概要と注意


ClothSerializeData2クラスはシステムが参照する非公開のパラメータを保持しています。
ClothSerializeDataと違い内容の変更を推奨しません。

しかしユーザーが独自の拡張機能を作成する場合に必要になる可能性があるためドキュメントとして記載しておきます。

アクセス


ClothSerializeData2はprivateのため直接はアクセスできません。
アクセスするにはMagicaClothコンポーネントのGetSerializeData2()を利用してください。

public ClothSerializeData2 GetSerializeData2()

Properties


selectionData

/// <summary>
/// vertex paint data.
/// </summary>
[SerializeField]
public SelectionData selectionData = new SelectionData();
/// <summary>
/// 頂点の属性情報(移動/固定/無効)データ
/// このデータはシリアライズされる
/// 座標はクロスコンポーネントのローカル空間で格納される
/// Vertex attribute information (move/fix/disable) data.
/// This data is serialized.
/// Coordinates are stored in the cloth component's local space.
/// </summary>
[System.Serializable]
public class SelectionData : IValid
{
  /// <summary>
  /// 属性のローカル座標
  /// これはクロスコンポーネント空間
  /// Attribute local coordinates.
  /// This is the cloth component space.
  /// </summary>
  public float3[] positions;

  /// <summary>
  /// 上記の属性値
  /// サイズはpositionsと同じでなくてはならない
  /// Attribute value above.
  /// size must be the same as positions.
  /// </summary>
  public VertexAttribute[] attributes;

  /// <summary>
  /// セレクションデータ構築時のVirtualMeshの最大頂点接続距離
  /// Maximum vertex connection distance of VirtualMesh when constructing selection data.
  /// </summary>
  public float maxConnectionDistance;

  /// <summary>
  /// ユーザーが編集したデータかどうか
  /// Is the data edited by the user?
  /// </summary>
  public bool userEdit = false;

boneAttributeDict

/// <summary>
/// Transformと頂点属性辞書データ
/// 実行時でのBoneCloth/BoneSpring作成時にはこの辞書にTransformと頂点属性のペアを格納することで頂点ペイントデータの代わりにすることができます。
/// Transform and vertex attribute dictionary data.
/// When creating BoneCloth/BoneSpring at runtime, you can store Transform and vertex attribute pairs in this dictionary and use it instead of vertex paint data.
/// </summary>
public Dictionary<Transform, VertexAttribute> boneAttributeDict = new Dictionary<Transform, VertexAttribute>();