Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

【Optimizers】- Easy to use and functional components to optimize any other components!

Discussion in 'Assets and Asset Store' started by FimpossibleCreations, Jan 28, 2020.

  1. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    509
    Hi,

    Is it possible to have the optimizer turn on/off the shadows smoothly? I'm referring to a fading/easing effect instead of the snap that we currently have.
     
  2. macicka12

    macicka12

    Joined:
    May 13, 2015
    Posts:
    14
    Hey, I am trying to use Progressive Occlusion Culling, but everytime I launch the game I get this error
    System.IndexOutOfRangeException: Index {0} is out of restricted IJobParallelFor range [{1}...{2}] in ReadWriteBuffer.


    I was following the visual guide so no idea what the problem might be. I am using unity 2021.2
    Thanks
     
    Last edited: Nov 24, 2021
  3. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    550
    If you have turned on transitioning ("Use Transitioning" toggle, after switching it appears as "Fade Duration"), it should change smoothly, just make sure "Use Shadows" is not being switched off on mesh renderers near the light, it can't be faded, so you can leave "Use Shadows" turned on, on one more LOD level for this mesh renderers.


    Thanks for reporting, I will take a look on it on the newest unity versions.
     
  4. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    509
    Okay so what is happening when I turn on the use transitioning it still snaps in and out like before just waits X seconds before doing so. I just have my spot light's shadow mode set to None on the first LOD.

    Fading out - waits X seconds and turns off the shadow.

    Fading in - turns on the shadow instantly without waiting the seconds.

    I'm using HDRP and a bit older version of Optimizers not sure if that may be the problem.
     
    Last edited: Nov 24, 2021
  5. Supergrubman

    Supergrubman

    Joined:
    Jan 2, 2014
    Posts:
    20
    Asset is awesome. FPS boost is so noticeable.
    This asset is the only one of it's kind. But that makes it's all the more sadder that it doesn't have multiple camera support.
    Please add multiple camera support.
     
  6. willianmedeiros

    willianmedeiros

    Joined:
    Feb 18, 2019
    Posts:
    1
    "Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported"
    I get this error when I use "Progressive Culling"
     
  7. MysleyMakers

    MysleyMakers

    Joined:
    Jul 27, 2021
    Posts:
    30
    Hello.

    optimizer.png

    Can you tell me why it is not recommended to do this? And what is the workaround for it?
     
  8. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    550
    Unfortunately I am not sure for this but I will try working on it in 2022.
    I am not sure since it would select LOD level on every object for the nearest camera.
    So if some objects are far for one camera but near for other then the far camera will see nearest LOD anyway.


    The shadow snap was fixed in some newer version of optimizers, it may be the case.
    Snap also can be produced by changing light importance, but on hdrp it's probably deferred rendering path and light importance change is not noticable here so that's probably not it.

    Progressive Culling is experimental feature, in next months it will be updated.
    I am not sure if this will not cause some issues, you can try adding line in code:
    Code (CSharp):
    1. collider.convex = true;
    in file Optimizers_Manager.DOTS.Generating.cs at line 29 (below line like: "collider.sharedMesh = collision;")


    You can still use it like that, it just to tell the boost of performance will be low, using this way it will give similar result just like using unity's LODGroup component. If you have possibility, try put optimizer on more objects/components.
     
    MysleyMakers likes this.
  9. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    509
    I've updated to the latest version, but unfortunately that didn't solve the problem, again the shadow is turning on / off instantly and in the inspector I'm watching the transition going from 0% to 100%. Can you test on unity 2020 LTS with latest HDRP?
     
  10. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    550
    Alright, it seems HDRP package is not syncing default Unity light parameters with HDRP parameters.
    We need to access HDRP light component and use shadowDimmer variable instead of shadowStrength.
    It makes it a bit complicated, but it should be no problem anyway, just follow this:

    1: Import package called "Fimpossible Assembly Definitions"
    2: Select AD_FimpOther assembly definition file, and in "Assembly Definition References" tab in the inspector window, add to list Unity.RenderPipelines.HighDefinition.Runtime assembly definition.
    (there will be already in list assemblies like "AD_FimpShared" and "AD_FimpSharedTools") then hit apply.

    (Warning: If your project have imported packages like burst, ECS, mathematics , you will need to add mathematics, jobs and burst to Fimp_Other and also Fimp_OtherEditor requires burst included)

    3: Modify "LODI_Light.cs" file, using computed "Shadow Strength" value to modify hdrp light shadowDimmer value.
    It's done in patch unitypackage file I provide below, I added "HDRP" comments in code in places where code changed, but it was just about 6 lines of code, so nothing too big.

    Now shadows should fade with transition option.
    If there still will be something wrong, please tell.
     

    Attached Files:

  11. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    509
    I have burst mathematics and jobs, can you send a screenshot of how the Fimp_Other and also Fimp_OtherEditor should look like when everything is added? I'm confused if I should add burst.editor to OtherEditor or burst same for jobs and mathematics.

    Do you plan to include this update to the asset store? I want to know when I update the version in the future if these changes will be lost.
     
  12. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    550
    upload_2021-12-3_8-19-22.png

    No it will not be added since there are no "#if HDRP" ifdefs making troubles with supporting different versions, but I may include links to google drive with the unitypackage supporting it (this will be probably only way).
    You don't need to worry anyway, the file which is needed to be changed wasn't edited since many updates, so after updating Optimizers, importing package I provided in the post above should work.
     
  13. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    509
    I will try this out, here's what I found about checking if HDRP is used (the last 2 responses I guess should work)

    https://forum.unity.com/threads/hdrp-lwrp-detection-from-editor-script.540642/

    Also before I've taken these steps Ive moved the Fimpossible Creations folder into the Plugins folder, but now what it did is create some folders outside the plugins folder so I have two Fimpossible Creations folders right now, which have similar subfolder names with 1 or 2 scripts in the new one, can I move them to my custom Plugins folder again or it will break the assembly references?
     
    Last edited: Dec 3, 2021
  14. MysleyMakers

    MysleyMakers

    Joined:
    Jul 27, 2021
    Posts:
    30
    Is there any performance impact in using too many detection radius? How much would be optimal for both performance and clarity (as in accuracy in mesh renderer detection) ?
     
  15. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    550
    You should be able to move FImpossible Folder freely in your project directories, only thing which will break is path to the scripts templates, but I will fix it in the next update so there will be no difference where the directory is.

    Count of LOD levels depends on the components you use + model visibility importance for your project.
    In most cases it's best and enough to use 3 or 4 LOD levels.
    The mesh renderer components are not offering much to change in it's draw quality, but some components can be more tweakable, that's why there is more LOD levels available.

    The impact in performance will be not noticable, just one thing to highlight: Using multiple objects with the same count of LOD levels, ranges and max distance gives best results. But it not mean all your objects requires the same distance settings, there are automatically generated groups for such objects (culling containers). You can thing about this like that: for example you have 200 objects with some distance settings, and 150 objects with other settings than the 200 ones, then, in simple words performance will cost ~2 culling computations instead of 350.
     
  16. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    509
    Okay, I will wait for this update because if I move it there are errors currently after following the instructions from above.
     
  17. MysleyMakers

    MysleyMakers

    Joined:
    Jul 27, 2021
    Posts:
    30
    Oh, I'm not talking about LOD. I mean the white spherical radius that is used to detect culling. I have this long pipe model and using one sphere radius is inaccurate, so I need to add multiple detection radius' to fit it's cylindrical shape.

    So, how many detection radius is too much? I use about 4 detection radius for the pipe as I'm afraid that using too much would have an impact in performance.
     
  18. giraffe1

    giraffe1

    Joined:
    Nov 1, 2014
    Posts:
    311
    Would optimizer be good for turning custom npc settings on/off (ik systems, muzzle flash, muzzle smoke, renderers, etc) when they are out of sight of the camera.

    would this be a good fit for optimizer asset?

    Also I noticed the docs dont mention anything about events and I searched this forum too and I didn't find anyone ask. Does your asset allow us to hook into the onStateChanged callback?

    Also do you have methods to register/unregister in runtime? Like when NPC's are instantiated/destroyed.

    Thanks
     
    Last edited: Dec 10, 2021
  19. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    550
    This sounds like good use for the plugin.
    When you add custom script component to the optimizer you can trigger different event on each LOD level you set up.
    upload_2021-12-11_1-1-30.png

    The register/unregister events may be not needed if I understand correctly what you meant.
     
  20. giraffe1

    giraffe1

    Joined:
    Nov 1, 2014
    Posts:
    311
    Hi, I tried what you said and it works. But I noticed some strange behavior I do not understand.

    here is a quick video showing my issue:

    Look at the console debug lines at 18s - 31s. After that I select gameobject from the scene view. At 43s look at the console again and you will notice different debug messages events firing. I did not move at all. Only difference is I selected gameobject in scene view.

    Any idea what causes the difference in events to be called in console?

    The correct debug messages show up after 43s after I select gameobject in scene view. I want these messages all the time.

     
    Last edited: Dec 11, 2021
  21. giraffe1

    giraffe1

    Joined:
    Nov 1, 2014
    Posts:
    311
    I think this is some sort of serialization issue.

    I switched to the 'Optimizer 2 (v2019.4+)' component and it works correctly now.
     
    Last edited: Dec 12, 2021
  22. giraffe1

    giraffe1

    Joined:
    Nov 1, 2014
    Posts:
    311
    1 How does the obstacle detection work? Does it always cast the rays or only if in the bounding sphere is in camera frustum?

    2 What is the method/procedure to remove the optimizer from the gameobject. After my npc is dead and ragdolled I want to remove the optimizer attached to the npc. Do I just destroy optimizer component?

    Thanks
     
    Last edited: Dec 12, 2021
  23. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    550
    It casts ray only when object is in camera frustum and not culled by distance + objects far in distance (but ones still visible) are casting rays with some frame delay to save cpu, if more cpu required then frames delay is bigger.

    You should be free to call just GameObject.Destroy(yourOptimizerComponent) or another solution: call
    yourOptimizerComponent.ChangeLODLevelTo(0); yourOptimizerComponent.enabled = false;
     
    giraffe1 likes this.
  24. giraffe1

    giraffe1

    Joined:
    Nov 1, 2014
    Posts:
    311
    Perfect thanks. Your asset is very very useful. Definitely a hidden gem! I did not even know about the culling group api until a few days ago and your asset really saved me a lot work! I will definitely leave you a review when I get a chance.

    My only suggestion would be if you could add the internal logic in the post above into documentation. That would probably be useful for first timer users and make the learning curve much easier. I had to figure it out through trial and error and asking you. It wasn't too hard but it might be frustrating/confusing for some beginners.
     
  25. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    550
    Thanks! I will take closer look on this features and implement some improvements in the next updates to come ;)
     
  26. Disastorm

    Disastorm

    Joined:
    Jun 16, 2013
    Posts:
    132
    Does this work in VR? Specifically the culling type stuff? Since vr has multiple cameras, does this take that into account?
     
  27. cloudkafu

    cloudkafu

    Joined:
    Mar 7, 2021
    Posts:
    3
    Hi,

    I got "out of range" exception at Optimizers_Manager.DynamicOptimization.cs line 171. After a closer look, the code seems to try to remove a member at wrong index. Looks like a typo to me.

    With this patch the exception is gone:


    diff --git a/Assets/FImpossible Creations/Plugins - Other/Optimizers 2/Code/Optimizers Manager/Optimizers_Manager.DynamicOptimization.cs b/Assets/FImpossible Creations/Plugins - Other/Optimizers 2/Code/Optimizers Manager/Optimizers_Manager.DynamicOptimization.cs
    index 1de226ff0..ddd1c594d 100644
    --- a/Assets/FImpossible Creations/Plugins - Other/Optimizers 2/Code/Optimizers Manager/Optimizers_Manager.DynamicOptimization.cs
    +++ b/Assets/FImpossible Creations/Plugins - Other/Optimizers 2/Code/Optimizers Manager/Optimizers_Manager.DynamicOptimization.cs
    @@ -168,7 +168,7 @@ namespace FIMSpace.FOptimizing
    if (targetClock != optimizer.CurrentDynamicDistanceCategory)
    {
    if (optimizer.CurrentDynamicDistanceCategory != null)
    - dynamicLists[(int)optimizer.CurrentDynamicDistanceCategory].RemoveAt(index);
    + dynamicLists[(int)optimizer.CurrentDynamicDistanceCategory].Remove(optimizer);

    dynamicLists[(int)targetClock].Add(optimizer);
    }

     
  28. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    550
    Some people used it already in VR with good results, but yes if you use two eyes cameras, you will need to make visibility bounds bigger to always keep objects in both eyes range, the efficiency will not be 100% but still should help.

    Thanks for report, I will take closer look on this lines what could cause error.
     
  29. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    Hello is there any way to Hande Optimizer Managers on our own, Its relly hard to predict wich one from wchich scene will be initialized first or destroyed when scenes reloding, We would like to keep it in in our settings scene that persist across whole game. and disable auto add feature
     
  30. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    550
    Optimizers Manager by default have enabled "Exist Through Scenes" which provides existence through whole game cycle (Don't Destroy OnLoad). If new scene is loaded and it contains other Optimizers Manager then it's not used and removed keeping the first initialized Optimizers Manager intact. If you load first settings scene then only this one Optimizers Manager will be used.

    Removing Optimizers Manager from all scenes can be problematic since in edit mode Optimizers components requires Manager reference, but you can try this for avoid it:

    Add this line in OptimizersManager.cs file: public static bool EditorExists { get { return _get != null; } }
    Then you need to add some "If" in Optimizers.Editor.cs file at the begginning of "OnInspectorGUI()" method:

    ...
    Undo.RecordObject(target, "Optimizers Inspector");

    if (OptimizersManager.EditorExists)
    if (OptimizersManager.Instance.UpdateOptimizersSystem == false)
    {
    ...

    If you're using progressive culling feature you need to add same "if" in Optimizers.Editor.Foldouts.cs file line 78

    I will provide this ifs for the next update.
     
  31. macicka12

    macicka12

    Joined:
    May 13, 2015
    Posts:
    14
    Hi, any updates on Progressive culling throwing this error ??

    Code (CSharp):
    1. System.IndexOutOfRangeException: Index {0} is out of restricted IJobParallelFor range [{1}...{2}] in ReadWriteBuffer.
    2.  
    3. This Exception was thrown from a job compiled with Burst, which has limited exception support.
    4. 0x00007ffeaeeb13d2 (cc0d66a36139c0caee5c46779c1c935) [unknown:0] Unity.Jobs.IJobParallelForExtensions.ParallelForJobStruct`1<FIMSpace.FOptimizing.OptimizersManager.CreateRayCommandsJob>.Execute
    5. 0x00007ffeaeeb1011 (cc0d66a36139c0caee5c46779c1c935) 2BCB969BC58E3B3C
    6. 0x00007ff6d9e3da50 (Unity) ExecuteJob
    7. 0x00007ff6d9e3dd05 (Unity) ExecuteJobCopyData
    8. 0x00007ff6d9e3e95f (Unity) ForwardJobForEachToManaged
    9. 0x00007ff6d9e39f2c (Unity) JobQueue::Exec
    10. 0x00007ff6d9e3a1ea (Unity) JobQueue::ExecuteJobFromHighPriorityStack
    11. 0x00007ff6d9e3a779 (Unity) JobQueue::ProcessJobs
    12. 0x00007ff6d9e3c7df (Unity) JobQueue::WorkLoop
    13. 0x00007ff6da02ef67 (Unity) Thread::RunThreadWrapper
    14. 0x00007fff3f717034 (KERNEL32) BaseThreadInitThunk
    15. 0x00007fff40d82651 (ntdll) RtlUserThreadStart
     
  32. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    550
    Hello, since I can't reproduce it on my side, can you try adding "[NativeDisableParallelForRestriction]" to all "NativeArray" types in the Optimizers_Manager.DOTS.Jobs.cs file?
    It will look like this upload_2022-1-19_1-26-42.png

    If error will still occur, it will be helpful if you prepare some simple repro scene, so I can analyze it on my side.
     
  33. macicka12

    macicka12

    Joined:
    May 13, 2015
    Posts:
    14
    Thank you for your response, unfortunately it didn't work. I will post the scene in a bit, for the time being I will write steps to reproduce.

    Steps to reproduce on my side:
    1. Add Optimizer 2 (v2019.4+) to my prefab
    2. Setup optimizer to use progressive culling
    3. Setup added Optimizer Manager to use progressive culling (pick layers etc.)
    4. Run the game (all objects with progressive culling active disappear and the error is constantly thrown)
    It does not matter in which order I do things, or if I add optimizers through your scene tools, result is still the same

    I am using unity 2021.2.8f, tried on multiple instances of 2021.2 and it did not work on any of them, maybe unity changed something??

    [EDIT]
    Okay I created a new project, simple scene, added optimizers package and the error is gone, but the progressive culling is still not working as expected. It hides all objects with optimizer on them, even if visible.

    I added a simple scene for you to try, it is really simple, just a few objects with optimizers and manager. It uses HDRP and 2021.2.8f (as I wanted to be as close as possible to my main project).

    But at least the error is gone, so I have no idea what is wrong with my main project...
     

    Attached Files:

    Last edited: Jan 19, 2022
  34. Doomchecker

    Doomchecker

    Joined:
    Apr 5, 2021
    Posts:
    110
    Hi there,
    just a quick question, I'm not 100% sure if I understood correctly.

    Would you advice adding the Essential Optimizer tool to basically every dynamic gameobject - provided that I don't mess with the settings that would create to many additional Culling Group Containers?
    Or should I pay attention to not use it for gameobjects that don't appear to often, even if the settings are the same.

    Thanks for you reply and also let me say, I tried a lot of optimizer tools and I honestly think this one might be my favorite. So easy to use and with great functionality. So keep on the good work ☺

    Best regards.
     
  35. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    550
    If the objects contains something more than just mesh renderer (but still you can try on just meshes too, but boost in performance may be hard to folow with that) then yes, you can try it. Only one important thing is keeping same count of LOD levels and max distance on all the objects.
    There are some numbers from user manual for reference:

    "When using 100 000 of LOD groups it can take about 1.4ms to 2.4ms for camera culling, when using 100 000 contained Optimizers it can take from 0.5ms up to 1.6ms so difference will be a bit noticeable only in very big numbers of game objects."
     
    Doomchecker likes this.
  36. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    Hello :)

    I have a question is there any posiblity to implement automatic change on first LOD basing on what actual compoent value is.
    What I mean is that We use light prefab with optimizer, where in optimizer we set up light in first lod as not important. but for some lights on our scene we would like to use still the same prefab but we would like to only change its render mode to important. Now we have to change value on light and on optimizer first lod. It would be great to have such as option as, "for lod 0 always use component default values" so if we will change light to important it will automatic way update optimizer lod 0 to the same values :) I hope I explained it well :)

    Thanks for creating awesome asset. it really gives great optimization for lights in open world first person game :)
     
  37. Dusty777

    Dusty777

    Joined:
    Jul 23, 2016
    Posts:
    9
    Hi Fimpossible team,

    I made a very simple test scene. And can't get optimizer2 working consistently.

    Using Optimizer2 on an object. I simply wanted to disable a Monobehaviour.
    Dragging just the camera, or dragging just the object to change distance.
    Enabling/disabling always inconsistent.

    Questions.
    1. Am I missing something for simple setup test of disable/enable monobehaviour? "Current LOD" often not updating with distance no matter what i do.
    2. What does the second checkbox indicate? See picture.
     

    Attached Files:

  38. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    550
    I'm glad the plugin helps your project ;)
    You can adjust the initial LOD settings individually for each object using the toggle on the top right of first LOD, it will enable editing.

    upload_2022-1-20_23-52-8.png
    After setting default render mode you can even disable the editing toggle back to false and first LOD should select one you selected.



    It looks like your monobehaviour is implementing public variable called "disable".
    (toggle on the right is telling optimizer if this variable should change when entering the LOD level, it looks more clear on variable types like float etc.)

    The actual component enable/disable is the one which start with capital letter, use it and it should switch your component.
     
  39. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647

    Hello thanks :) yes I know about that function, I just though about something more Automatic keeping changes of what was changed in component.

    Second question is that I noticed in our build game that log: (I think it was rather warning than error but did You saw that earlier?)


    IndexOutOfRangeException: Index was outside the bounds of the array.
    at FIMSpace.FOptimizing.Optimizers_CullingContainer.MoveStackOptimizerToFreeSlot () [0x00001] in D:\SloncaKresProject\SLONCAKRES_PROJECT_PROPPER\Assets\FImpossible Creations\Plugins\Optimizers 2\Code\Optimizers Manager\Manager Helpers\Optimizers_CullingContainer.cs:205
    at FIMSpace.FOptimizing.Optimizers_CullingContainer.RemoveOptimizer (FIMSpace.FOptimizing.Optimizer_Base optimizer) [0x00057] in D:\SloncaKresProject\SLONCAKRES_PROJECT_PROPPER\Assets\FImpossible Creations\Plugins\Optimizers 2\Code\Optimizers Manager\Manager Helpers\Optimizers_CullingContainer.cs:174
    at FIMSpace.FOptimizing.Optimizer_Base.CleanCullingGroup () [0x00032] in D:\SloncaKresProject\SLONCAKRES_PROJECT_PROPPER\Assets\FImpossible Creations\Plugins\Optimizers 2\Code\Optimizer Base\Optimizer_Base.API.CullingGroups.cs:194
    at FIMSpace.FOptimizing.Optimizer_Base.OnDestroy () [0x00008] in D:\SloncaKresProject\SLONCAKRES_PROJECT_PROPPER\Assets\FImpossible Creations\Plugins\Optimizers 2\Code\Optimizer Base\Optimizer_Base.Editor.cs:197
     
  40. asb9599

    asb9599

    Joined:
    Oct 22, 2017
    Posts:
    6
    Hi there,
    I recently purchased this asset to help optimize the procedurally generated levels linked up through room prefabs in my game, but I'm having a bit of trouble getting it to work correctly. The main feature I'm trying to get to work right now is dynamic occlusion culling, as right now if I'm looking at a wall that has a majority of the map past it, pretty much everything will render and seriously hurt performance. I tried following the instructions for implementing Progressive Culling on the Essential Optimizer's component, but the Mathematics and Collections packages did not import automatically after importing Jobs and I had to directly import them via git URL. After doing that, Burst automatically imported, but when I go to the Additional Features section of the Essential Optimizer inspector, I saw none of the new parameters that were supposed to be unlocked after all packages were imported. Am I missing something?
     
  41. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    550
    Are you sure you've put all the required libraries (like Burs, Jobs etc.) in the assembly definitions?
    You use unity 2019.1+?
    It should automatically detect it and unlock new options in the inspector view.
    You can still unlock this options by forcing adding project define, you can go to file "Optimizers.CheckIfDOTSImported"
    and leave only code like this:

    Code (CSharp):
    1.     static string thedef = "OPTIMIZERS_DOTS_IMPORTED";
    2.     static FOptimizers_CheckDOTSDefine()
    3.     {
    4.         FDefinesCompilation.SetDefine(thedef);
    5.     }
     
  42. Coreengage

    Coreengage

    Joined:
    Nov 25, 2020
    Posts:
    6
    Hi

    Can you update this plugin compatible for "Optimizers 2" version please, I want to manage Animator component with optimizer and I found this plugin but looks like outdated.

    Thank you.
     
  43. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    550
    Hello, you can optimize Animator component only by switching Unity's built in "Culling Mode", but I guess you want to use it also with the obstacle detection to disable animator behind walls, then the additional implementation is required.
    I prepared example implementation (very simple, just enable/disable Animator) you can use it with ScriptableOptimizer right away, or with Optimizer 2019.4+ version (scriptable optimizer can have trouble with supporting nested prefabs)
    I included readme to one-step implementation for the 2019.4+ version in the "Optim2019Plus_AnimatorImplementation_READ_ME.cs" file
    https://drive.google.com/file/d/1Ujw5GDlDdnpDbOt-uovrGsGj84mW1P8k/view?usp=sharing
    After implementing, you should be able to add Animator to "To Optimize" list (It will not work with Essential Optimizer but will work with the two other solutions):
    upload_2022-2-28_15-14-32.png
     
    Last edited: Feb 28, 2022
  44. Coreengage

    Coreengage

    Joined:
    Nov 25, 2020
    Posts:
    6
    Thank you, I added Animators without any problem
     
  45. giraffe1

    giraffe1

    Joined:
    Nov 1, 2014
    Posts:
    311
    Can you please look into this bug. I made a quick video:


    Project details:
    Unity 2021.2.15f1
    URP3D Template
    New project with only 1 asset(latest version of optimizers)

    I have tried to add an unity event but I always get this same error. Please help.

    Thank you
     
  46. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    550
    Thanks for reporting, I updated the version on the asset store, it should work now.
     
    dsilverthorn, giraffe1 and atomicjoe like this.
  47. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    455
  48. FimpossibleCreations

    FimpossibleCreations

    Joined:
    Jun 27, 2018
    Posts:
    550
    I can't reproduce it, but I added some protection in code in the newest update on the asset store.
    Can you try updating, importing plugin and check if the error which appeared with "Exist through scenes" checked still occurs?
     
    Gua likes this.
  49. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    455
    In new version error is gone. Thanks!
     
  50. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    455
    I've found a bug. Optimizers component affects sound source volume when it shouldn't.