Ejemplo n.º 1
0
    void Generate()
    {
        PixelSettings pixelSettings = (PixelSettings)ScriptableObject.CreateInstance <PixelSettings>();

        AssetDatabase.CreateAsset(pixelSettings, "Assets/Resources/PixelSettings.asset");
        AssetDatabase.SaveAssets();
        AssetDatabase.Refresh();
    }
Ejemplo n.º 2
0
    void OnEnable()
    {
        PixelSettings pixelSettings = (PixelSettings)Resources.Load("PixelSettings");

        pixelsPerUnit = pixelSettings.pixelsPerUnit;
        unitsPerPixel = 1f / pixelsPerUnit;
        width         = Screen.width;
        height        = Screen.height;
    }
Ejemplo n.º 3
0
    void Update()
    {
        canWillRender   = true;
        canRenderObject = true;
        PixelSettings pixelSettings = (PixelSettings)Resources.Load("PixelSettings");

        pixelsPerUnit = pixelSettings.pixelsPerUnit;
        width         = Screen.width;
        height        = Screen.height;
        unitsPerPixel = 1f / pixelsPerUnit;
    }