本文整理匯總了C#中Pathfinding.AstarSerializer.AddUnityReferenceValue方法的典型用法代碼示例。如果您正苦於以下問題:C# AstarSerializer.AddUnityReferenceValue方法的具體用法?C# AstarSerializer.AddUnityReferenceValue怎麽用?C# AstarSerializer.AddUnityReferenceValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Pathfinding.AstarSerializer
的用法示例。
在下文中一共展示了AstarSerializer.AddUnityReferenceValue方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: SerializeSettings
public void SerializeSettings(AstarSerializer serializer)
{
serializer.AddUnityReferenceValue ("source",source);
serializer.AddValue ("enabled",enabled);
for (int i=0;i<factors.Length;i++) {
serializer.AddValue ("factor"+i,factors[i]);
}
for (int i=0;i<channels.Length;i++) {
serializer.AddValue ("channel"+i,(int)channels[i]);
}
}
示例2: SerializeSettings
public void SerializeSettings (AstarSerializer serializer) {;
serializer.AddUnityReferenceValue ("root",root);
serializer.AddValue ("maxDistance",maxDistance);
serializer.AddValue ("limits",limits);
serializer.AddValue ("mask",mask.value);
serializer.AddValue ("thickRaycast",thickRaycast);
serializer.AddValue ("thickRaycastRadius",thickRaycastRadius);
serializer.AddValue ("searchTag",searchTag);
serializer.AddValue ("recursive",recursive);
serializer.AddValue ("raycast",raycast);
}
示例3: SerializeSettings
public void SerializeSettings (AstarSerializer serializer) {
System.IO.BinaryWriter stream = serializer.writerStream;
serializer.AddValue ("offset",offset);
serializer.AddValue ("rotation",rotation);
serializer.AddValue ("scale",scale);
if (sourceMesh != null) {
Vector3[] verts = sourceMesh.vertices;
int[] tris = sourceMesh.triangles;
stream.Write (verts.Length);
stream.Write (tris.Length);
for (int i=0;i<verts.Length;i++) {
stream.Write (verts[i].x);
stream.Write (verts[i].y);
stream.Write (verts[i].z);
}
for (int i=0;i<tris.Length;i++) {
stream.Write (tris[i]);
}
} else {
stream.Write (0);
stream.Write (0);
}
serializer.AddUnityReferenceValue ("sourceMesh",sourceMesh);
}