Giter Site home page Giter Site logo

gizmos's Introduction

Sup

gizmos's People

Contributors

felippeduran avatar jeremybois avatar kirevdokimov avatar popcron avatar runninglvlan 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  avatar  avatar  avatar

gizmos's Issues

Gizmos in builds only working in the first scene

Hi, first of all, thanks for this awesome package, really useful in play mode.
I have one small issue.
When having more than one scenes. In the build, the gizmos are only rendering in the first scene. They just do not appear in the following scenes. Any thoughts?
Thanks for you help.
I'm using Unity 2019.1.0f2

Rendering issues with Universal Render Pipeline

This is not related to your package specifically, but maybe you know some info on how to fix it.
Recently I added RenderPipelineManager.endCameraRendering to this package for rendering with Unity's Rendering Pipelines, but using this delegate Gizmos are incorrectly rendered in Game view.
Here is a comment in Unity post and a question with details. Noone has made any comments yet =(

Lines rendering towards camera.

I have attached 2 images below.In editor(image 1) the the lines drawn are perfectly placed on the planet orbits but in runtime(image 2) the lines faced towards the direction of the camera.How to fix it or make the lines stay static?Thanks in advance.
img1
img2

AR and URP

Does anybody test it on Andorid with AR 4.1.0 and URP 8.3.1. It doesn't render on phone.

Gizmos.Camera

The Gizmos.Circle doesn't rotate towards the camera! It doesn't work if you manually set Gizmos.Camera as well.

Workaround, use this code:

    Gizmos.Circle(transform.position, 0.2f, Quaternion.LookRotation(transform.position - Camera.main.transform.position), Color.white);

GC Alloc

Anyway to reduce or eliminate the memory allocation being created?
Screenshot_3

I'm using your gizmos to display hitboxes. It works really well!
Screenshot_4

i am lost, cant use package

hello,

i tried to install your package but somewhy I get this error that Gizmos doesnt have any of the drawing methods
image

could you help me out?

[2018.4.23] Not working in Play Mode

Hello,
Apparently, in my project, the rendering of gizmos works well only in the Editor when the Play Mode is not enabled.
I can see the gizmos in SceneView and Game View.

I am using Unity 2018.4.23f1 and the legacy render pipeline (no Render Pipeline Asset).
When debugging, I can see I go through all the drawing process, so I am not sure what is different in Play Mode.
The Gizmos Draw methods are called into my OnRenderObject() method (ExecuteAlways attribute is used to see the result in the editor).

I thought it could come from the onPostRender event, but even without PostProcess activated in the scene, I am not able to see it.

Any ideas ?
Thank you.

EDIT :

After more investigation, it seems the GizmosInstance.queuIndex is equal to 1 when it arrives at OnRendered(Camera cam).
So only the dummy Gizmos is processed. But in the queue, there are all the submitted Gizmos through OnRenderObject()...

I will let you know if I find something.

Not Rendering in Android Phone

I developed an AR app that rendered gizmo lines on the screen.When it didnt render then since my AR app doesnt have a MainCamera component & only using the Vuforia AR Camera component I then added it using the specified filter.But for some reason the lines(circle created using line) I created aren't rendering on the screen.It is visible in the Editor mode though.I am also new to C# scipting & Unity & so I am sorry if I explained it wrong.I have also included my script I attached to the gameobject below.Thanks in advance.
circlescript.txt

Gizmo disappear in play mode // Unity 2019.1.0f2

Hi. Thank you for your work to bring Gizmos to life also in build and play mode. I find it useful.
I would just like to say, that it doesn't work in Unity 2019.1.0f2. It shows gizmo for a moment in play mode and then it goes away.

Gizmo for VR

I am working with standalone VR (Oculus Go, Oculus Quest) where I can only use builds to test things. This tool is great, but when this is in VR, where there is 3 cameras (left, right, center eyes) I cannot see gizmos things because everything is drawing to center camera. It would be great if this tool will be able to work with 2 cameras at the same time.

I just write this here to ask if you can make this feature or advice how to do so. Anyway I am going to figure out how it works and then try to make a solution.

Have a nice day :)

Rendering issues with HDRP

Previously I was working with URP, in which there are two active cameras (MainCamera, UICamera) in my game view. Calling methods such as PopcronGizmos.Line or PopcronGizmos.Draw was rendering fine when viewing from the MainCamera. However, it seems that after having upgraded to HDRP, the same functionalities aren't rendering now from the MainCamera. After some investigation of my own and coming across this thread, it seems that I had to make the following change to GizmosInstance on my local clone of the repo to make rendering work for HDRP:

  • Change RenderPipelineManager callback from endCameraRendering to endContexRendering which takes a list of cameras instead of a single one. I would then have to filter the list of cameras to find one tagged with MainCamera to then pass to OnRendered to draw GL lines.
  • Sample code change here:
private void OnRendered(ScriptableRenderContext context, List<Camera> cameras) => OnRendered(cameras.FirstOrDefault(c => c.tag == "MainCamera"));

After some debugging, it seems that using endCameraRendering keeps alternating between the two cameras in my scene which then would mean the lines I want to draw will not persist in the game view from my MainCamera.

Is there a way to fix this such that draw lines still work for the MainCamera with HDRP with a multi-camera setup, and that I don't have to maintain my own fork of the repo?

Material can't be changed through Gizmos

//use custom material, if null it uses a default line material
Gizmos.Material = material;

This is an example from README which isn't working right now. I could change the material only this way: Popcron.GizmosInstance.Material = material;

Gizmos.DrawRay

i dont find Gizmos.DrawRay in here , how can i put it in ?

Conflict with Graphic.DrawMeshInstancedProcedural

I have write a plugin to show waveforms of audioclips in scene by using compute buffer and DrawMeshInstancedProcedural function. And I use your gizmos drawing plugin at same time. Then I found that your gizmos may not rendered correctly on Game View while the waveforms are rendering.
image
When the bounds of waveforms is out of field of vision, then the gizmos can rendered correctly. I can't find the reason.
Besides, I have used two compute buffers to calculate waveforms. At the beginning I wonder if it is because the compute buffers are on conflict. But I found that the gizmos can be rendered correctly while I just removed the line of Graphic.DrawMeshInstancedProcedural() but keep buffers delivering their data.

Version control

Hi @popcron,

Thanks for making this awesome UPM package. I'm the creator of the OpenUPM platform, an open-source UPM registry, and continuous build service based on Git tags. It's hosting more than 200+ open-source UPM packages at the time of writing.

To make it happen, I would suggest you make GitHub releases (which create Git tags) for version control. It can be achieved either manually or using an automatic approach.

In your case, the new release would be 1.6.6 or v1.6.6. After your GitHub release, our build pipelines will detect the changes and build UPM packages in 5-10 minutes. Then you can visit your package at https://openupm.com/packages/com.popcron.gizmos/.

Hopeful this makes sense for you.

"Authentication failed" error caused every time I pressed to play

Sorry, me again.
Actually, it happened long time ago.
Every time I pressed to play in edit mode, this error caused. Because of it did not cause any other problem after I pressed to unpause, I didn't asked for help. For I need to test on play mode more frequently, now it puzzled me a lot.
How can I fix it? In fact, every scene whatever it has some script to use you plugin or not will cause this error as the same.
The error log is on below.

IOException: Authentication failed because the remote party has closed the transport stream.
Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake (Mono.Net.Security.AsyncOperationStatus status) (at <14e3453b740b4bd690e8d4e5a013a715>:0)
(wrapper remoting-invoke-with-check) Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake(Mono.Net.Security.AsyncOperationStatus)
Mono.Net.Security.AsyncHandshakeRequest.Run (Mono.Net.Security.AsyncOperationStatus status) (at <14e3453b740b4bd690e8d4e5a013a715>:0)
Mono.Net.Security.AsyncProtocolRequest+d__24.MoveNext () (at <14e3453b740b4bd690e8d4e5a013a715>:0)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at :0)
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at :0)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at :0)
System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at :0)
System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () (at :0)
Mono.Net.Security.AsyncProtocolRequest+d__23.MoveNext () (at <14e3453b740b4bd690e8d4e5a013a715>:0)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at :0)
Mono.Net.Security.MobileAuthenticatedStream+d__47.MoveNext () (at <14e3453b740b4bd690e8d4e5a013a715>:0)
Rethrow as AggregateException: One or more errors occurred.
System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) (at :0)
System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) (at :0)
System.Threading.Tasks.Task.Wait () (at :0)
Mono.Net.Security.MobileAuthenticatedStream.AuthenticateAsClient (System.String targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Boolean checkCertificateRevocation) (at <14e3453b740b4bd690e8d4e5a013a715>:0)
Mono.Net.Security.MonoTlsStream.CreateStream (System.Byte[] buffer) (at <14e3453b740b4bd690e8d4e5a013a715>:0)
System.Net.WebConnection.CreateStream (System.Net.HttpWebRequest request) (at <14e3453b740b4bd690e8d4e5a013a715>:0)
Rethrow as WebException: Error: SecureChannelFailure (One or more errors occurred.)
System.Net.HttpWebRequest.EndGetResponse (System.IAsyncResult asyncResult) (at <14e3453b740b4bd690e8d4e5a013a715>:0)
System.Net.WebClient.GetWebResponse (System.Net.WebRequest request, System.IAsyncResult result) (at <14e3453b740b4bd690e8d4e5a013a715>:0)
System.Net.WebClient.DownloadBitsResponseCallback (System.IAsyncResult result) (at <14e3453b740b4bd690e8d4e5a013a715>:0)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at :0)
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at :0)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at :0)
System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at :0)
System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () (at <fb001e01371b4adca20013e0ac763896>:0) Updater+<IsUpdateAvailable>d__6.MoveNext () (at Library/PackageCache/com.popcron.gizmos@41dfa17124/Editor/Updater.cs:28) --- End of stack trace from previous location where exception was thrown --- System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <fb001e01371b4adca20013e0ac763896>:0) System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at <fb001e01371b4adca20013e0ac763896>:0) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at <fb001e01371b4adca20013e0ac763896>:0) System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at <fb001e01371b4adca20013e0ac763896>:0) System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () (at :0)
Updater+d__8.MoveNext () (at Library/PackageCache/com.popcron.gizmos@41dfa17124/Editor/Updater.cs:71)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at :0)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__6_0 (System.Object state) (at :0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at <2791c1cdbfd943f6aba0f758c93ccc78>:0)
UnityEngine.UnitySynchronizationContext:ExecuteTasks()

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.