Photon Unity Networking 2 2.45

Static Public Member Functions | Static Public Attributes | List of all members
PunExtensions Class Reference

Small number of extension methods that make it easier for PUN to work cross-Unity-versions. More...

Static Public Member Functions

static ParameterInfo[] GetCachedParemeters (this MethodInfo mo)
 
static PhotonView[] GetPhotonViewsInChildren (this UnityEngine.GameObject go)
 
static PhotonView GetPhotonView (this UnityEngine.GameObject go)
 
static bool AlmostEquals (this Vector3 target, Vector3 second, float sqrMagnitudePrecision)
 compares the squared magnitude of target - second to given float value More...
 
static bool AlmostEquals (this Vector2 target, Vector2 second, float sqrMagnitudePrecision)
 compares the squared magnitude of target - second to given float value More...
 
static bool AlmostEquals (this Quaternion target, Quaternion second, float maxAngle)
 compares the angle between target and second to given float value More...
 
static bool AlmostEquals (this float target, float second, float floatDiff)
 compares two floats and returns true of their difference is less than floatDiff More...
 
static bool CheckIsAssignableFrom (this Type to, Type from)
 
static bool CheckIsInterface (this Type to)
 

Static Public Attributes

static Dictionary< MethodInfo, ParameterInfo[]> ParametersOfMethods = new Dictionary<MethodInfo, ParameterInfo[]>()
 

Detailed Description

Small number of extension methods that make it easier for PUN to work cross-Unity-versions.

Member Function Documentation

◆ AlmostEquals() [1/4]

static bool AlmostEquals ( this float  target,
float  second,
float  floatDiff 
)
static

compares two floats and returns true of their difference is less than floatDiff

◆ AlmostEquals() [2/4]

static bool AlmostEquals ( this Quaternion  target,
Quaternion  second,
float  maxAngle 
)
static

compares the angle between target and second to given float value

◆ AlmostEquals() [3/4]

static bool AlmostEquals ( this Vector2  target,
Vector2  second,
float  sqrMagnitudePrecision 
)
static

compares the squared magnitude of target - second to given float value

◆ AlmostEquals() [4/4]

static bool AlmostEquals ( this Vector3  target,
Vector3  second,
float  sqrMagnitudePrecision 
)
static

compares the squared magnitude of target - second to given float value