Code Monkey home page Code Monkey logo

unityruntimepreviewgenerator's People

Contributors

yasirkula avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unityruntimepreviewgenerator's Issues

Can work in the ui?

image
I want to generate two preview images for these two objects.

I tried to run the following code
RuntimePreviewGenerator.GenerateModelPreview
But that return result is null

Can this plugin work within the ui?

Cannot't set background alpha in windows

RuntimePreviewGenerator.BackgroundColor = Color.clear; //new Color(1, 1, 1, 0); //new Color(0.3f, 0.3f, 0.3f, 0f) ;
tex = RuntimePreviewGenerator.GenerateModelPreview(model.transform ,256,256);
image.texture = tex; // RawImage

Thanks

Editor Script Error

Hi, when using your script in one of my editor scripts I get the following error when trying to save as PNG:

UnityException: Texture '' is not readable, the texture memory can not be accessed from scripts. You can make the texture readable in the Texture Import Settings.
CreateAssetBundles.SaveTextureToFile (UnityEngine.Texture2D texture, System.String filename) (at Assets/Editor/CreateAssetBundles.cs:37)
CreateAssetBundles.BuildAllAssetBundlesiOS () (at Assets/Editor/CreateAssetBundles.cs:29)

[Android] Preview generator background opacity ignored when backgroundColor is set. OpenGLES3

Trying to generate a preview on a simple Unlit/Transparent material on a primitive Quad.

Issue occurs regardless if a render pipeline was set or not.
Tried tweaking player settings with no luck.

Preview Generator configuration:
RuntimePreviewGenerator.PreviewRenderCamera = null;
RuntimePreviewGenerator.PreviewDirection = Vector3.forward;
RuntimePreviewGenerator.BackgroundColor = new Color(1, 1, 1, 0); // Also occurs using Color.clear and a black background;
RuntimePreviewGenerator.Padding = 0;
RuntimePreviewGenerator.OrthographicMode = true;
RuntimePreviewGenerator.MarkTextureNonReadable = false;

Previews work fine in editor, but Android builds using OpenGLES3 seem to ignore transparency on textures. On Vulkan this works correctly, but the platforms I want to support do not support Vulkan.

Specs:

  • Unity version: 2019.4.9f1
  • Platform: Android
  • Device: Samsung Galaxy S9+, Android 9 (Pie)
  • How did you download the plugin: Package Manager: v1.0.0. Using the Asset Store version shows the same result.

Additional info:
Minimum API Level: 26, Android 8 (Oreo)
Target API Level: 30

This util doesn't support UI objects

I created an object with the following hierarchy:

image

And the following view:

image

But the following is previewed:

image

Is there any option to make it work with UI items?

some lables are dark when generate how can i fix it?thanks

Description of the bug

A clear and concise description of what the bug is. Before reporting a bug, please do a quick search in Issues to see if it is already reported. If the documentation has a FAQ (Frequently Asked Questions), please also check out the entries there.

Reproduction steps

If possible, providing reproduction steps would be very helpful while pinpointing the issue. You can also post screenshots if you think they would be helpful.

Platform specs

Please provide the following info if this is a Unity 3D repository.

  • Unity version: e.g. 2018.3.1f1
  • Platform: e.g. Android, iOS, Windows
  • Device: if Platform is Android or iOS, please provide the model and the OS version of your device; e.g. Samsung Galaxy S8, Android 10
  • How did you download the plugin: e.g. Asset Store, GitHub, Package Manager. Please make sure that your asset is up-to-date

Additional info

Please check Logcat (Android) or Xcode console (iOS) for any meaningful error messages and include them here.

[Android] RuntimePreviewGenerator generates texture with black background (OpenGLES3, Vulkan)

Unity version: 2019.4.7f1

Imported Runtime Preview Generator package.

Configured runtime preview generator, set background color to Color.clear, also tried new Color(0, 0, 0, 0);

In editor this works, but an Android build shows the resulting texture has a black backgorund fully opaque.

We use the alpha of the preview texture to assist us with raycasting and selecting objects in the scene using Google Cardboard.
I have tried OpenGLES3 and Vulkan graphics API but they show the same result.

Any help would be appreciated.
Screenshot_20200818-132235_SITU360-test

Screenshot_20200818-132238_SITU360-test

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.