Пример #1
0
    //-------------------------------------------------------------------------

    //-------------------------------------------------------------------------
    void ReadAllParams()
    {
        mDefaultColliderDirectory         = EditorPrefs.GetString("AlphaMeshCollider_DefaultColliderDirectory", INITIAL_COLLIDER_PATH);
        mDefaultLiveUpdate                = EditorPrefs.GetBool("AlphaMeshCollider_DefaultLiveUpdate", true);
        mDefaultAlphaOpaqueThreshold      = EditorPrefs.GetFloat("AlphaMeshCollider_DefaultAlphaOpaqueThreshold", 0.1f);
        mDefaultColliderPointCount        = EditorPrefs.GetInt("AlphaMeshCollider_DefaultColliderPointCount", 20);
        mColliderPointCountSliderMaxValue = EditorPrefs.GetInt("AlphaMeshCollider_ColliderPointCountSliderMaxValue", 100);
        mDefaultAbsoluteColliderThickness = EditorPrefs.GetFloat("AlphaMeshCollider_DefaultAbsoluteColliderThickness", 2.0f);
#if UNITY_4_3_AND_LATER
        mDefaultTargetColliderType = (AlphaMeshCollider.TargetColliderType)EditorPrefs.GetInt("AlphaMeshCollider_DefaultTargetColliderType", 1);          // defaults to 1 == PolygonCollider2D
#endif
        mDefaultConvex      = EditorPrefs.GetBool("AlphaMeshCollider_DefaultConvex", false);
        mDefaultTrigger     = EditorPrefs.GetBool("AlphaMeshCollider_DefaultTrigger", false);
        mDefaultFlipNormals = EditorPrefs.GetBool("AlphaMeshCollider_DefaultFlipNormals", false);

        mDefaultLowerTop     = EditorPrefs.GetFloat("AlphaMeshCollider_DefaultLowerTop", 0.0f);
        mDefaultRaiseBottom  = EditorPrefs.GetFloat("AlphaMeshCollider_DefaultRaiseBottom", 0.0f);
        mDefaultCutLeft      = EditorPrefs.GetFloat("AlphaMeshCollider_DefaultCutLeft", 0.0f);
        mDefaultCutRight     = EditorPrefs.GetFloat("AlphaMeshCollider_DefaultCutRight", 0.0f);
        mDefaultExpandTop    = EditorPrefs.GetFloat("AlphaMeshCollider_DefaultExpandTop", 0.0f);
        mDefaultExpandBottom = EditorPrefs.GetFloat("AlphaMeshCollider_DefaultExpandBottom", 0.0f);
        mDefaultExpandLeft   = EditorPrefs.GetFloat("AlphaMeshCollider_DefaultExpandLeft", 0.0f);
        mDefaultExpandRight  = EditorPrefs.GetFloat("AlphaMeshCollider_DefaultExpandRight", 0.0f);

        mCutSidesSliderMaxValue = EditorPrefs.GetFloat("AlphaMeshCollider_CutSidesSliderMaxValue", 0.5f);
    }
Пример #2
0
    //-------------------------------------------------------------------------

    //-------------------------------------------------------------------------
    void ReadAllParams()
    {
        mDefaultColliderDirectory         = EditorPrefs.GetString("AlphaMeshCollider_DefaultColliderDirectory", INITIAL_COLLIDER_PATH);
        mDefaultLiveUpdate                = EditorPrefs.GetBool("AlphaMeshCollider_DefaultLiveUpdate", true);
        mDefaultColliderPointCount        = EditorPrefs.GetInt("AlphaMeshCollider_DefaultColliderPointCount", 20);
        mColliderPointCountSliderMaxValue = EditorPrefs.GetInt("AlphaMeshCollider_ColliderPointCountSliderMaxValue", 100);
        mDefaultConvex = EditorPrefs.GetBool("AlphaMeshCollider_DefaultConvex", false);
        mDefaultAbsoluteColliderThickness = EditorPrefs.GetFloat("AlphaMeshCollider_DefaultAbsoluteColliderThickness", 2.0f);
#if UNITY_4_3_AND_LATER
        mDefaultTargetColliderType = (AlphaMeshCollider.TargetColliderType)EditorPrefs.GetInt("AlphaMeshCollider_DefaultTargetColliderType", 1);          // defaults to 1 == PolygonCollider2D
#endif
    }
Пример #3
0
	//-------------------------------------------------------------------------
	
	//-------------------------------------------------------------------------
	void ReadAllParams()
	{
		mDefaultColliderDirectory = EditorPrefs.GetString("AlphaMeshCollider_DefaultColliderDirectory", INITIAL_COLLIDER_PATH);
		mDefaultLiveUpdate = EditorPrefs.GetBool("AlphaMeshCollider_DefaultLiveUpdate", true);
        mDefaultAlphaOpaqueThreshold = EditorPrefs.GetFloat("AlphaMeshCollider_DefaultAlphaOpaqueThreshold", 0.1f);
		mDefaultColliderPointCount = EditorPrefs.GetInt("AlphaMeshCollider_DefaultColliderPointCount", 20);
		mColliderPointCountSliderMaxValue = EditorPrefs.GetInt("AlphaMeshCollider_ColliderPointCountSliderMaxValue", 100);
		mDefaultAbsoluteColliderThickness = EditorPrefs.GetFloat("AlphaMeshCollider_DefaultAbsoluteColliderThickness", 2.0f);
#if UNITY_4_3_AND_LATER
		mDefaultTargetColliderType = (AlphaMeshCollider.TargetColliderType) EditorPrefs.GetInt("AlphaMeshCollider_DefaultTargetColliderType", 1); // defaults to 1 == PolygonCollider2D
#endif
        mDefaultConvex = EditorPrefs.GetBool("AlphaMeshCollider_DefaultConvex", false);
        mDefaultFlipNormals = EditorPrefs.GetBool("AlphaMeshCollider_DefaultFlipNormals", false);
	}