Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Highlighting System [Released]

Discussion in 'Assets and Asset Store' started by slice3d, Jul 10, 2012.

  1. Mikeronomicon

    Mikeronomicon

    Joined:
    Apr 25, 2013
    Posts:
    2
    Hi, I was wondering if you can help me get this to work. I opened your demo files, and I followed the instructions in the documentation, but I can't get anything to glow. I was under the impression that I could just drop scripts onto the appropriate objects and they would then glow with the highlight effect. I applied the highlighting effect script to my camera, then the highlightable object script to the object I wanted to glow, but nothing happened. Normally I would have time to dink around and figure it out, but I'm on a pretty hectic deadline right now. I don't write C# (at least I haven't yet done so) so I really don't know what I should do to get this script to work. Any suggestions would be awesome. Thanks for making this also, that totally rules.
     
  2. Mikeronomicon

    Mikeronomicon

    Joined:
    Apr 25, 2013
    Posts:
    2
    Nevermind, I got it to work. Damn my lack of programming knowledge! Thanks for this awesome tool, you made me and my client very happy. Especially me.
     
  3. neoUFO

    neoUFO

    Joined:
    Apr 17, 2013
    Posts:
    8
    This helped me, since I had the problem with v2.0. Please remember to include this fix in new updates.


     
    Last edited: May 9, 2013
  4. Ossadtchii

    Ossadtchii

    Joined:
    Dec 27, 2012
    Posts:
    1
    Hello. I'm interested in buying this asset. However i was wondering if it was possible to make objects flash in a solid color? i'm looking for this exact kind of outlining for my project but then with solid colors over the objects. I tried finding a solution but with no luck.

    Please let me know.
     
  5. Zapan15

    Zapan15

    Joined:
    Apr 11, 2011
    Posts:
    186
    Hi,

    I want to assistance the feature request with a solid color. For me it's important to have a solid outline color (like black) without blending. Could you add this? Thank you very much.

    Regards
    André
     
  6. Spoking

    Spoking

    Joined:
    Nov 21, 2012
    Posts:
    2
    I just bought this package, but I did not know that it doesn't work on android games. Is there a way to make it work for android?
     
  7. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    http://forum.unity3d.com/threads/14...leased/page8?p=1236302&viewfull=1#post1236302

     
  8. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    daisyDynamics,
    Thanks one more time for the link!

    Mikeronomicon,
    Yeah, you need to know at least how to call methods in C#/JS or Boo to use it.
    Glad that my Highlighting System makes people happier. :) Thank you!

    neoUFO,
    Sure, I will include this fix into the next update!

    Ossadtchii,
    Hello!
    Sorry, but can you provide an example image of what you are searching for?
    If you mean highlighting by filling the inner shape of an object - then no, Highlighting System can currently make only outer glow effects.

    Zapan15,
    Hi!
    You are asking for the highlighting without gradient fading like here on this image?
    $a5ut2.jpg

    Spoking,
    It must work on the Android device with OpenGL ES 2.0 support and Unity for Android Pro (not free).
    Make sure that your device and Unity version fits these requirements, and then if it's still doesn't work, as quoted by ZJP, you should report this issue to Unity Technologies (don't forget to provide your device model and Android OS version you are using).

    ZJP,
    Thanks! I think we have a Highlighting System/Android OS expert here! ;)


    TO ALL
    I'm sorry, but due to a leakage of my Highlighting System to the internet, from now on, I will accept feature\support requests ONLY via my support email to a licenced customers only.
    That means, if you are writing me email for the first time - please provide the invoice number with your message, which can be found in PDF that you have received upon purchase with "Unity Asset Store purchase confirmation" email here:
    $invoicenumber.jpg
    I'm sorry for the inconvenience, but you must do it only once - I will remember you as a licenced customer.
    Thanks!
     
  9. GXMark

    GXMark

    Joined:
    Oct 13, 2012
    Posts:
    514
    Having the same issues but I put this fix into the composite shader ...

    fixed4 frag(v2f i) : COLOR
    {
    fixed4 framebuffer = tex2D(_MainTex, i.uv[0]);
    fixed4 stencil = tex2D(_StencilTex, i.uv[1]);

    fixed4 blurred = tex2D(_BlurTex, i.uv[1]);
    fixed4 color;

    if (stencil.a != 0f)
    color = framebuffer;
    else
    color.rgb = lerp(framebuffer.rgb, blurred.rgb, saturate(blurred.a - stencil.a));
    color.a = framebuffer.a;
    return color;
    }








     
  10. Rudy-Pangestu

    Rudy-Pangestu

    Joined:
    May 24, 2013
    Posts:
    16
    Hello slice3d,

    I'm using your highlighting system, and I find it very amazing. It's easy to use, and the result is great.

    However, I find it very slow on very old computer. Without the highlighting effect, I can get FPS boost from 13 to 23.

    The computer spec (pulled from SystemInfo):
    Processor: Genuine Intel(R) CPU T2130 @ 1.86GHz (959 MB)
    RAM: 959 MB
    GPU: VIA Chrome9 HC IGP; Direct3D 9.0c [S3gIGP.dll 6.14.10.78]
    GPU Memory: 64 MB
    Shader Level: 2.0

    I'm curious to know if there's any way to make it less expensive to render.

    For some info, I only use the standard 1 frame highlighting (shown on mouse over, hidden on mouse out). The highlighting color is white. The highlighted objects are usually static, and most of the time, there's no movement in the scene camera.

    Any help is gladly appreciated :)

    Thanks,
    Rudy
     
  11. PandaTrueno

    PandaTrueno

    Joined:
    May 26, 2013
    Posts:
    2
    Hi,
    Sorry my English is not very well but I have a big problem with objects under cursor!!!
    (1) Why the objects under cursor always highlight in red? I have tried to set color by OnParams() method but it doesn't work! Is there any way to change that color ?
    (2) Is it possible to disabled highlight object under cursor in another color but keep highlighting in its original color? Sometimes I don't want to indicate which object is under cursor.

    Thanks!! :D
     
  12. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    Rudy Pangestu,
    Hi!

    Thank you! :)

    Well, I think that's the reason why Torchlight game developers have used another highlighting method without post-processing.
    They used some sort of a simple rimlighting for highlighted objects.
    As a result - torchlight can run smoothly even on old netbooks.

    Unfortunately, there is no way to make post-processing less expensive to render on old hardware.
    And also - no way to realize such highlighting effect quality without using post-processing.

    But I can say that another updates will be targeted to performance improvement if I will find something that can be optimized.

    PandaTrueno,
    Hi!

    It's ok!
    1. As I understand, you are simply dropped the CameraTargeting.cs script from the demo to your camera.
    If you open it - you will see the "ho_On(Color.red);" string, which overrides your OnParams() color setting call.
    2. Everything (including all scripts) in the HighlightingSystemDemo folder is merely an example of a proper Highlighting System API usage, and assumed to be used only as a reference.
    You can implement any highlighting logic by creating your own HighlightingController which will call HighlightableObject API methods described in the provided Documentation.
     
  13. PandaTrueno

    PandaTrueno

    Joined:
    May 26, 2013
    Posts:
    2
    Hi!
    Thank you so much!! It's an awesome system!!! :D
     
  14. wana7262

    wana7262

    Joined:
    Jul 2, 2012
    Posts:
    103
    not working with lightmaped object
     
  15. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    PandaTrueno,
    Thanks!

    wana7262,
    It works after applying this simple hotfix.
    Sorry for the inconvenience!
     
  16. FiveFingers

    FiveFingers

    Joined:
    Oct 15, 2009
    Posts:
    541
    The fix for SSOA and other blur-based effects works good.
    I'm wondering, how does the occlusion works ?

    I expected to see culled only mesh with colliders, but it seems also other skinned meshes are passed through,
    there a practice way to filter what will be a occluded or not ?

    Thank you.
     
  17. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    Hi!

    I bought this plugin today, and for the most part it's working very well except for an odd bug: when it initializes, it seems to be reading in the default intensity value from the script file, not the inspector setting.

    Here's what happens:

    1. I have the HighlightingEffect script on my main game camera set to Downsampling None, Iterations 1, Min Spread 1, Spread 0, and Intensity 1. When I start the game, the outline on objects looks like this:

    $Screen Shot 2013-06-14 at 5.16.18 PM.png

    As you can see, the outline is very thin and hard to notice.

    2. If I run the game in the editor and manually drag the Intensity slider down and back up to 1, it correctly sets the Intensity to 1, which looks like this:

    $Screen Shot 2013-06-14 at 5.16.37 PM.png

    3. As an experiment, I started to play around with the Intensity value to see roughly what setting it appears to be initializing at. I finally found that it is starting out with a value of 0.3, which looks like this:

    $Screen Shot 2013-06-14 at 5.17.34 PM.png

    If you swap between the first and third pictures, they're identical.

    I thought this was curious, so I opened up the HighlightingEffect script and noticed that the default Intensity value is in fact 0.3:

    For some reason, whenever I start my game, the Intensity value sticks at 0.3, not the 1 that I have set in the inspector. If I manually drag the slider around and set it back to 1 after the game has started, it maintains the correct setting and looks right.

    The weirdest thing about it is that if I start a new project and just add a cube and a camera and add the scripts, the setting of 1 works correctly. So this isn't a systemic bug; it only happens in my game.

    One possible clue: I've also noticed that if I disable and re-enable the HighlightingEffect component on my camera, it always initializes to 0.3 again, and I have to re-drag the slider to get it to 1. When my game starts up, within the first few tenths of a second it loads in an additional scene. Do you think that loading a new scene could cause the HighlightingEffect script to re-initialize, which would simulate disabling and re-enabling the component and in turn cause the 0.3 bug to happen again?
     
  18. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    FiveFingers,
    I'm sorry but I don't understand your question. Can you explain it a little bit clearer?
    Thanks!

    OneThree,
    Hi!

    May be you must just hit Prefab: Apply after changing your HighlightingEffect settings?
     
  19. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    Unfortunately, that doesn't work. :-/

    I ran a quick test where I disabled the scene-loading code when my game first starts up, but it didn't help either. I'm totally baffled. In a simple level w/ a cube, it works fine. In a normal production level, it starts off with the 0.3 setting and has to be manually set to 1 in the inspector.

    1) Can you think of any reason this might be? Perhaps a conflict with some other graphical effect on my camera? I currently have Vignetting, Blur Effect, Grayscale Effect and Bloom And Lens Flares (all stock Unity plugins) on the camera, though they're all disabled at start.

    2) Is there any logging I could do to help you track it down?

    3) Is there any way to access the HighlightingEffect script's settings at runtime? I could try to just manually set them in script ...
     
  20. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    OneThree,
    1) Looks like the problem is in the Unity serialization - not in the conflict with other post-processing effects.
    2) See below.
    3) Yes, all settings are public in HighlightingEffect.cs, so you can access them freely and change in runtime, but it is better to find what is causing this problem.

    If it works in a simple scene with a cube, you can track it down by adding all your other game scripts one-by-one to this scene.

    Also, you can try to remove HighlightingSystemEditor.cs script from the Editor folder, save and restart Unity Editor, and then try to setup all settings without this custom editor.
     
  21. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    Cool, thank for the quick reply. I'm using uScript, which normally exposes all plugin settings via reflection, but for some reason I can't get access to HighlightingEffect. I'll poke around and see if I can figure it out, but I'm not quite sure if that'll be possible.

    Please keep me posted in case you can find an issue with the serialization ... I'll let you know if I can get anything figured out on my end.
     
  22. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    Unfortunately, removing the editor script didn't help. In fact, after removing it the Intensity variable wasn't respected at all. I could change all of the other properties (min spread, etc) at run-time and see the change on-screen, but Intensity values never changed from the default 0.3 setting. So without the editor it's even worse ... with the editor I can at least correct it after the game starts, but by just entering values in the field w/o the editor I can't update Intensity at all.

    I'm really lost as to what could be causing this, and unfortunately my game is way too complex to just remove a script here or a script there to test things; it's a full-on retail game that's nearing release, so it's very interconnected and if I start dropping stuff the game might not even run ...
     
  23. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    Do you have any ideas what could be wrong here? Have you tracked down the bug with serialization?

    Even in a test map, when I disable and re-enable the script at run-time by toggling the component on and off, the plugin fails to use the right settings when it's turned back on. So something in my main map might be triggering the behavior, but the bug seems to be that for some reason the HighlightingEffect script just isn't respecting the inspector settings when enabled (either at map start or after toggling).
     
  24. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    OneThree,
    I'm sorry, but I can't reproduce your bug.
    I've checked both cases where HighlightingEffect component is part of a prefab and where it's just part of a unique object in scene.
    In both cases changing highlighting parameters works as expected (in case of a prefab you must hit Prefab:Apply after changing any HighlightingEffect parameters in the Inspector as with any other Components).
    Problem may be caused by your code or any other plugins you use in your project.
    You must understand that I can't track it down without having your complete working level (with all scripts) where this bug appear.
     
  25. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    Totally understandable. I just uploaded a simple project that demonstrates the bug. It was built using the uScript plugin, and you can find the actual C# script files in the _GeneratedCode folder.

    The level just has a camera and a cube. When the game runs, a script turns on the highlight on the cube. The first time it's turned on, it matches the settings in the inspector.

    Then, the script toggles the HighlightingEffect component on the Main Camera object off and on every second. You can see that once the effect has been turned off and back on, the HighlightingEffect component no longer uses the inspector values.

    I hope this helps!
     
    Last edited: Jun 18, 2013
  26. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    OneThree, do you understand that you shared for free my paid Highlighting System package here?
    Please remove your post and attachment as soon as possible.
    Also, if you want me to continue supporting your copy of the Highlighting System you must write me to the support email specified in the documentation. And don't forget to provide your invoice number.
     
    Last edited: Jun 18, 2013
  27. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    Oh my, I completely spaced. I apologize for posting your plugin, and have removed the file. I'll send an email today.
     
  28. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    OneThree,
    Ok, thanks. I've got your file (hope I'm the only one:)), will check it as soon as I can and get back to you.
     
  29. Dandolittle

    Dandolittle

    Joined:
    Jul 2, 2013
    Posts:
    17
    G'Day

    don't mean to bother you but i have come across a very irritating bug visually.
    What happens is when a Highlightable Object script is enabled within my scene along side a shader that reflects objects ( for example water pro )
    the reflection is map relocates itself in a 90 degree angle. it fixes itself back up in the scene when i disable Highlighting effects script but it makes it difficult since one of my scenes has a vast ocean and its extremely noticeable. Do you know any way to fix this? will be greatly appreciated!

    attached images to show the effects its giving me with and without highlighting enabled

    $noglow.png

    $withglow.png

    Regards
     
  30. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    Dandolittle,
    Hi!

    Wow, that's strange!
    It is better to write me an email because of this (please read TO ALL section) - and we will resolve your problem.
    Thanks!
     
  31. Katarak

    Katarak

    Joined:
    Feb 19, 2013
    Posts:
    13
  32. Cameron_SM

    Cameron_SM

    Joined:
    Jun 1, 2009
    Posts:
    915
    Making your paying customers jump through extra hoops because of pirates is a bit annoying. Totally turned me off buying this. Pirates gonna pirate stuff no matter what and this isn't going to change, probably ever. Yeah it's a bummer when it happens, but the system you have isn't rocket science (for most developers). I was mostly interested to save the time of implementing this myself but the email shenanigans make me think this might not really save much time if I run into any integration issues. If people are going out of their way to pirate something like this, they were never even a potential customer, just ignore em. Anyway, best of luck.
     
    Last edited: Jul 23, 2013
  33. daisySa

    daisySa

    Joined:
    Dec 29, 2011
    Posts:
    341
    I understand what you're saying and essentially agree, but really, there's no hoop-jumping required. You just send Slice your email receipt once, and from then on you can just write to him directly at his private email address. You don't have to send it every time.

    His support is fast and helpful and the product is fantastic. There's plenty of stuff to avoid in the Asset Store, but this isn't one of 'em.
     
  34. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    Katarak,
    Not in the current version, but in the older ones - it was possible. Previously, you can add inner tinting by changing the Inner Tint Value (_InnerTint material property) of the highlighted material,
    though this was undocumented and officially not supported feature which has been removed in the 2.0 update due to incompatibility with the lerp compositing mode (having correct highlighting colors is more useful than having the inner tinting option).
    If you have purchased your copy of the Highlighting System recently - you can email me your invoice number and I will send you the older version if you're interested, but I must warn you that it lacks of some cool features that has been implemented in 2.0 release.

    Cameron.,
    I'm sorry for the inconvenience!
    But does writing directly to the developer email isn't a better way to resolve all your issues faster? Finding your invoice number wouldn't take more than a minute or two and you must do it only once.
    I'm not saying that I will ignore posts in this forum, but when I'm spending my time to the support here (rather than working on a new features for my product) - I wish to be sure that I'm helping my legal customers. Again, sorry for the inconvenience!

    daisyDynamics,
    Wow! Thank you for the good words! :) It is very important for me to know that I have happy customers! ;)


    To all,
    Guys, I want to inform you that now I'm working on these major things:
    1. Mobile-optimized rendering.
    2. New highlighting mode in which all objects in the scene become highlighting occluders automatically and without the need to render them twice.
    3. Some other optimizations (It turns out that the C# events/delegates in Unity are not so fast as I thought initially).

    I can not guarantee that all these features will be implemented and included in upcoming release, but I'm doing my best.

    Thanks!
     
  35. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    As usual. Waiting for and good luck. ;)
     
  36. rocket5tim

    rocket5tim

    Joined:
    May 19, 2009
    Posts:
    242
    Looks like a bug cropped up in Unity 4.2. I have 2 cameras in my scene. Camera1 has the Highlighting Effect script and Depth = -1. Camera2 is just a default camera. If I set the Depth on Camera2 to -1 (same as Camera1) or less than Camera2's depth setting (eg. -2, -3, etc) I get the following Warnings in the console. These spew every frame:

    It's slamming my console every frame, Is there any way I can disable that warning or hotfix the script?
     
  37. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    ZJP,
    Thanks! :)

    rocket5tim,
    Thanks for the report, Tim!
    I think it's somehow connected with this (taken from Unity 4.2 release notes):
    Installing 4.2 update now...
     
  38. Tin-Can

    Tin-Can

    Joined:
    Jul 28, 2013
    Posts:
    3
    Sorry if this question has been asked and resolved already.

    How do I get the Highlighting Effect script on the camera to work with the SSAOEffect script (the standard assets one that unity ships with)? It seems that the Highlighting Effect trumps the ambient occlusion. Is there any way to get them to play nice together?
     
  39. DevNoob

    DevNoob

    Joined:
    Jul 30, 2013
    Posts:
    2
    I got a S3 Issue, but I solved it.

    Look your "HighlightingEffect" Script

    compMaterial.SetTexture("_BlurTex", oddEven?buffer:buffer2); <- This is original Code
    compMaterial.SetTexture("_BlurTex", buffer); <- This is My Code

    and I removed "FourTapCone" funtion

    It's simple.
    Maybe this is not a good solution, but it works to me. I tested with S2, S3, S4 and Galaxy note2
    I think S3 had a lower memory than S2 or S4. so Device can't take many buffers.

    My english is bad, sorry about that but thank you for read my reply.
     
  40. CrazyMick

    CrazyMick

    Joined:
    Aug 28, 2012
    Posts:
    3
    Hi,

    I've been using this excellent tool for a while, specifically in one of my Android games. Since upgrading to Unity 4.2, I have been getting this error returned at every frame :

    Code (csharp):
    1.  
    2. Tiled GPU perf. warning: RenderTexture  (227x142) was not cleared/discarded, doing Camera.ImageEffects/Camera.ImageEffect/HighlightingEffect.OnRenderImage()
    3. UnityEngine.Graphics:Blit(Texture, RenderTexture, Material)
    4. HighlightingEffect:FourTapCone(RenderTexture, RenderTexture, Int32) (at Assets/Plugins/HighlightingSystem/Scripts/HighlightingEffect.cs:305)
    5. HighlightingEffect:OnRenderImage(RenderTexture, RenderTexture) (at Assets/Plugins/HighlightingSystem/Scripts/HighlightingEffect.cs:406)
    Since a similar issue has been brought up earlier in this thread, I thought this might help too.
     
  41. FiveFingers

    FiveFingers

    Joined:
    Oct 15, 2009
    Posts:
    541
    A new problem popped in upgrading to Unity 4.2
    DOF, Antialias and other effects are broken if you put highlight fx on that camera(I re imported all the image effects package, because I was missing the new things, problem popped out after this op.)

    I can't miss all those 4.2 features and fixes, I need your package I bought, to work on Unity 4.2 new image effects! Pls pls pls pls pls


    *update* the Antialias post effect panel states: "Antialias not available" in yellow, but then it works when run, dunno why this happens (on cameras without highlighting this message doesn't appear)

    and also other effects seem fine but I found a very bad bug on newest SSAOS effect, when the camera is far and rotates, the pixel "shadowing" move with the camera and look nasty (and wrong) but this happens also without highlights so I guess, there are no big issues with 4.2 here
     
    Last edited: Aug 2, 2013
  42. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    rocket5tim, DevNoob, CrazyMick, FiveFingers,
    Guys, sorry for the delay - I'm having some problems... To be clear - I've quit my job and moving into another city right now.
    The good news is that soon I will buy my own Mac Mini and will enter the iOS developer program (future updates of the Highlighting System will be targeted to the mobile optimizations and Unity 4.2 features support)
    I promise that all your issues will be resolved as soon as I will have more time (I think it will take month or two from now on).
    Sorry for the inconvenience and thank you for your understanding!

    Tin Can,
    Please, try to apply this hotfix.
     
    Last edited: Aug 2, 2013
  43. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    I've run into an issue: when the HighlightingEffect script is toggled on and off at runtime, it doesn't preserve the Use Z-Buffer setting; that setting defaults to off when the component is enabled.

    Are there any hotfixes I can apply to make it so that that setting is preserved?
     
  44. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    Okay guys, I'm back!
    Now I have Mac Mini and recently I've been approved as an Apple Developer.
    Working now on reimplementing Highlighting System with a 'real' stencil buffer (released in Unity 4.2) to support RenderTexture antialiasing feature (also released with Unity 4.2). After this will be done - I will dig into mobile optimizations.

    OneThree,
    This setting is designed not to be used in runtime, since changing it requires recaching of all the highlighting shaders (slow if you have many highlightable objects in your scene), what probably occurs only on initialization stage. So I strongly recommend you not to change this setting in runtime.
     
  45. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    Just to make sure we're on the same page, I'm not toggling this property at runtime. I am turning the entire HighlightingEffect component on and off. I'm not modifying the Z-Buffer setting.

    But if the Z-Buffer setting is set to on when the game starts, if I turn the HighlightingEffect component off and back on the Z-Buffer setting will now be false.

    Are you also recommending that I not turn HighlightingEffect itself on and off? So far I haven't noticed any performance impact from doing that, at least in my game (maybe I just don't have enough highlightable objects to cause an issue).
     
  46. KJoanette

    KJoanette

    Joined:
    Jun 8, 2013
    Posts:
    59
    Lightmaps seem to wreak havoc on your highlighting system. As soon as my scene incorporates static objects in to the lightmap they are no longer able to highlight. I'm not entirely sure what Unity is doing in this case but my best guess is that they are failing to render to the RT that you use.

    Any thoughts on a resolution?
     
  47. KJoanette

    KJoanette

    Joined:
    Jun 8, 2013
    Posts:
    59
    Looks like there was a hotfix around I could apply. Belay that request!
     
  48. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    Hi, could you please let me know whether it's bad to turn the component itself on and off at runtime?
     
  49. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    OneThree,
    Can you please send to my email an example project with which I can reproduce this problem?
    I've tested your case on both PC and Mac and everything works as expected.
    As I remember - you are trying to control Highlighting System through a PlayMaker, so the PlayMaker may cause this problem.

    KJoanette,
    Yes, please apply a hotfix.
    Sorry for the inconvenience!
     
  50. OneThree

    OneThree

    Joined:
    Oct 28, 2011
    Posts:
    181
    Well, this is bizarre. I created a demo project and was unable to repro the issue. I tried a ton of things in the demo project and in my main project, and was unable to reproduce it on anything other than my main camera.

    I found that no matter what I did, even if I put a breakpoint on the first frame of the game, the Z-Buffer setting would come unchecked on the first frame of the game. Even when I disabled everything in the scene and disabled all scripts running on the camera (other than HighlightingEffect).

    This didn't happen with newly-placed cameras in the same scene, so as a last resort I simply removed the component from my main camera and re-added a fresh component with the exact same settings and ... voila. It works fine. The Z-Buffer setting stays on at runtime, and doesn't get messed up by disabling/reenabling the component.

    I have no idea why it got into that state, but I guess something in the scene must have corrupted it or something. Now that I deleted and readded, everything is fine. Any idea why that might have happened?