From 302b0fdd25d2a08f661f887681865096e0b82373 Mon Sep 17 00:00:00 2001 From: BlackMATov Date: Fri, 25 Nov 2016 03:00:49 +0700 Subject: [PATCH] fix 5.4 physics warning --- Assets/IsoTools/Scripts/IsoRigidbody.cs | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/Assets/IsoTools/Scripts/IsoRigidbody.cs b/Assets/IsoTools/Scripts/IsoRigidbody.cs index aaea7ed..9d57ef5 100644 --- a/Assets/IsoTools/Scripts/IsoRigidbody.cs +++ b/Assets/IsoTools/Scripts/IsoRigidbody.cs @@ -125,6 +125,25 @@ namespace IsoTools { } } + #if UNITY_5_4_OR_NEWER + public int solverIterations { + get { return realRigidbody ? realRigidbody.solverIterations : 0; } + set { + if ( realRigidbody ) { + realRigidbody.solverIterations = value; + } + } + } + + public int solverVelocityIterations { + get { return realRigidbody ? realRigidbody.solverVelocityIterations : 0; } + set { + if ( realRigidbody ) { + realRigidbody.solverVelocityIterations = value; + } + } + } + #else public int solverIterationCount { get { return realRigidbody ? realRigidbody.solverIterationCount : 0; } set { @@ -134,6 +153,16 @@ namespace IsoTools { } } + public int solverVelocityIterationCount { + get { return realRigidbody ? realRigidbody.solverVelocityIterationCount : 0; } + set { + if ( realRigidbody ) { + realRigidbody.solverVelocityIterationCount = value; + } + } + } + #endif + public bool useConeFriction { get { return realRigidbody ? realRigidbody.useConeFriction : false; } set {