コード例 #1
0
        void ImportSVG(string file)
        {
            SVG svg = new SVG(file);

            originalPoints.Clear();
            imported = svg.CreateSplineComputers(Vector3.zero, Quaternion.identity);
            if (imported.Count == 0)
            {
                return;
            }
            importedParent = new GameObject(svg.name);
            foreach (SplineComputer comp in imported)
            {
                comp.transform.parent = importedParent.transform;
            }
#if UNITY_2019_1_OR_NEWER
            SceneView.duringSceneGui += OnScene;
#else
            SceneView.onSceneGUIDelegate += OnScene;
#endif

            GetImportedPoints();
            ApplyPoints();
            promptSave = true;
        }