Skin2D.Start C# (CSharp) Method

Start() private method

private Start ( ) : void
return void
    void Start()
    {
        #if UNITY_EDITOR
        if (GetComponent<SortingLayerExposed>() == null) {
            gameObject.AddComponent<SortingLayerExposed>();
        }
        if (!Application.isPlaying && showMeshOutline) {
            CalculateVertexColors();
        }
        #endif
        if (Application.isPlaying) {
            Mesh oldMesh = skinnedMeshRenderer.sharedMesh;
            if (oldMesh != null) {
                Mesh newMesh = (Mesh)Object.Instantiate(oldMesh);
                skinnedMeshRenderer.sharedMesh = newMesh;
            }
        }
    }