Ejemplo n.º 1
0
    public void Process(Component @object)
    {
        var image = @object as Image;

        if (image.sprite != null)
        {
            string spritePath = KDepBuild_UGUI.BuildSprite(image.sprite);
            KAssetDep.Create <KImageDep>(image, spritePath);
            image.sprite = null;
        }
    }
Ejemplo n.º 2
0
    public void Process(Component @object)
    {
        var renderer = @object as SpriteRenderer;

        if (renderer.sprite != null)
        {
            var spritePath = KDepBuild_UGUI.BuildSprite(renderer.sprite);
            KAssetDep.Create <KSpriteRendererDep>(renderer, spritePath);
            renderer.sprite = null; // 挖空依赖的数据
        }
        else
        {
            Logger.LogWarning("SpriteRenderer null sprite: {0}", renderer.name);
        }
    }