Ver código fonte

修复TSRandom序列化错误导致随机数不正确的问题 (#562)

susices 1 ano atrás
pai
commit
5a6eacc34e

+ 2 - 0
Unity/Assets/Scripts/ThirdParty/TrueSync/TSRandom.cs

@@ -115,6 +115,7 @@ namespace TrueSync {
         /**
         /**
          *  @brief Returns a {@link FP} between 0.0 [inclusive] and 1.0 [inclusive].
          *  @brief Returns a {@link FP} between 0.0 [inclusive] and 1.0 [inclusive].
          **/
          **/
+        [MemoryPackIgnore]
         public FP value {
         public FP value {
             get {
             get {
                 return this.NextFP();
                 return this.NextFP();
@@ -124,6 +125,7 @@ namespace TrueSync {
         /**
         /**
          *  @brief Returns a random {@link TSVector} representing a point inside a sphere with radius 1.
          *  @brief Returns a random {@link TSVector} representing a point inside a sphere with radius 1.
          **/
          **/
+        [MemoryPackIgnore]
         public TSVector insideUnitSphere {
         public TSVector insideUnitSphere {
             get {
             get {
                 return new TSVector(value, value, value);
                 return new TSVector(value, value, value);