There are two main kind of drawable instances: paths and shapes. Its Root property is an instance of SceneNode, which contains a list of drawable items, a list of child nodes, a transform and a clipper (see clipping). This is accompanied by static methods to manipulate and transform this data.Īt the core of the Vector Graphics package is the Scene class, which stores a graph of vector objects. The Vector Graphics API is a set of simple classes and structures that holds the vector data together. The SVG importer uses these APIs internally to generate and tessellate the resulting sprites. The provided classes and methods enable you to work with vector data directly in code. The Sprite Editor is also available and works exactly the same way as regular sprite assets. The importer subdivides curves for as long as every enabled constraint isn't satisfied. Maximum tangent angle (in degrees) after which the importer generates tessellation. More samples may result in more precise curves, especially when the curves have sharp corners.ĭistance on the cord to a straight line between two points after which the importer generates more tessellation. Number of samples the importer evaluates on paths. Lower values result in a more dense tessellation. If you want full control over the tessellation of the SVG document, you can specify the following advanced settings: Propertyĭistance at which the importer generates vertices along the paths. Then the importer automatically configures the advanced settings to make sure your SVG document renders at a high enough tessellation for that resolution at that zoom factor. When using Basic, you only need to provide a Target Resolution and a Zoom Factor. You can provide tessellation settings in two ways: Basic or Advanced. When using SVG Origin, the pivot is the (0,0) position of the SVG document. This follows the same convention as regular sprites, with an additional SVG Origin pivot value. Location of the pivot for the generated sprite. A smaller step distance will result in smoother curves at the expense of more triangles. Number of SVG units that correspond to 1 scene unit.ĭistance at which Unity generates triangles when tessellating the paths. When imported, you can instantiate the resulting assets in the Hierarchy View or the Scene View. Either drop them directly into the Assets folder in the Projects window, or select Assets > Import New Asset from the menu bar. You import SVG files into the Unity Editor like any other assets. This package provides an SVG importer that reads and interprets SVG documents and generates 2D sprites for use in Unity. Animations are not supported (SVG 1.1 section 19).Any interactivity feature are not supported (SVG 1.1 section 16).Filter effects are not supported (SVG 1.1 section 15).Per-pixel masking is not supported (SVG 1.1 section 14.4).Text elements are not yet supported (SVG 1.1 section 10).The SVG importer in this package implements a subset of the SVG 1.1 specification, with some limitations: This Vector Graphics package version 1.0.0 is compatible with the following versions of the Unity Editor:Ģ018.1 up to 2019.1 (recommended). The Vector Graphics package provides an SVG importer as well as generic vector graphics APIs.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |