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

Template [RELEASED] Mech Combat Kit

Discussion in 'Tools In Progress' started by Billy4184, Mar 23, 2020.

  1. aggaton

    aggaton

    Joined:
    Jul 3, 2021
    Posts:
    113
    I think I resolved above issue by opening up the Packages/manifest.json file and change the Package Manager UI version from 2.0.8 to 2.2.0, for some reason The upgrade button was not showing in the Package Manager window. I know it is a hack, but seems to be working, in case somebody else has the same issue as me.
     
  2. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    If you are using Unity 2019+, the 'Package Manager UI' package is not required or used, and can be removed.
     
    aggaton likes this.
  3. aggaton

    aggaton

    Joined:
    Jul 3, 2021
    Posts:
    113
    Thanks for your response, I think I got that first issue resolved and the initial errors went away. I dragged the PlayerMechSimple into the multiple vehicle demo and replaced the first person shooter with it (I think) by dropping it into the ships exit/enter manager. However now when I run I get the following errors:

    Assembly 'Packages/com.unity.ads/Editor/UnityEditor.Advertisements.dll' will not be loaded due to errors:
    Unable to resolve reference 'UnityEditor.iOS.Extensions.Xcode'. Is the assembly missing or incompatible with the current platform?
    Reference validation can be disabled in the Plugin Inspector.

    NullReferenceException: Object reference not set to an instance of an object
    VSX.UniversalVehicleCombat.Radar.HUDManager.SetHUDCamera (UnityEngine.Camera hudCamera) (at Assets/SpaceCombatKit/Systems/Basics/UVCFramework/Core/HUD/HUDManager.cs:55)
    UnityEngine.Events.InvokableCall`1[T1].Invoke (T1 args0) (at <adfa4b62400849189388df71c9e26e89>:0)
    UnityEngine.Events.UnityEvent`1[T0].Invoke (T0 arg0) (at <adfa4b62400849189388df71c9e26e89>:0)
    VSX.CameraSystem.CameraTarget.SetCamera (VSX.CameraSystem.CameraEntity cameraEntity) (at Assets/SpaceCombatKit/Systems/Basics/CameraSystem/Scripts/Core/CameraTarget.cs:107)
    VSX.CameraSystem.CameraEntity.SetCameraTarget (VSX.CameraSystem.CameraTarget target) (at Assets/SpaceCombatKit/Systems/Basics/CameraSystem/Scripts/Core/CameraEntity.cs:220)
    VSX.UniversalVehicleCombat.VehicleCamera.SetCameraTarget (VSX.CameraSystem.CameraTarget target) (at Assets/SpaceCombatKit/Systems/Basics/CameraSystem/Scripts/UVC/VehicleCamera.cs:87)
    VSX.UniversalVehicleCombat.VehicleCamera.SetVehicle (VSX.UniversalVehicleCombat.Vehicle newVehicle) (at Assets/SpaceCombatKit/Systems/Basics/CameraSystem/Scripts/UVC/VehicleCamera.cs:75)
    UnityEngine.Events.InvokableCall`1[T1].Invoke (T1 args0) (at <adfa4b62400849189388df71c9e26e89>:0)
    UnityEngine.Events.UnityEvent`1[T0].Invoke (T0 arg0) (at <adfa4b62400849189388df71c9e26e89>:0)
    VSX.UniversalVehicleCombat.GameAgentManager.OnFocusedVehicleChanged (VSX.UniversalVehicleCombat.Vehicle vehicle) (at Assets/SpaceCombatKit/Systems/Basics/UVCFramework/Core/GameAgents/GameAgentManager.cs:192)
    UnityEngine.Events.InvokableCall`1[T1].Invoke (T1 args0) (at <adfa4b62400849189388df71c9e26e89>:0)
    UnityEngine.Events.UnityEvent`1[T0].Invoke (T0 arg0) (at <adfa4b62400849189388df71c9e26e89>:0)
    VSX.UniversalVehicleCombat.GameAgent.EnterVehicle (VSX.UniversalVehicleCombat.Vehicle newVehicle) (at Assets/SpaceCombatKit/Systems/Basics/UVCFramework/Core/GameAgents/GameAgent.cs:170)
    VSX.UniversalVehicleCombat.GameAgent.Start () (at Assets/SpaceCombatKit/Systems/Basics/UVCFramework/Core/GameAgents/GameAgent.cs:115)
     
    Last edited: Aug 1, 2021
  4. aggaton

    aggaton

    Joined:
    Jul 3, 2021
    Posts:
    113
    I got past the first error by adding iOS build support and restarting Unity, still getting the 2nd error, however I think it is related to maybe not having attached all the object that needs to be attached in the variables, question is which one is missing...
    EDIT: I missed replacing the first person shooter with the mech tin the Game Agent...Errors now went away, however I cannot seem to move...
     
    Last edited: Aug 1, 2021
  5. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    What do you mean by the 'first person shooter'? Is this the demo scene that comes with the kit?
     
  6. Sr-Liermann

    Sr-Liermann

    Joined:
    Jan 7, 2015
    Posts:
    68
    Hello, Will you update with more features?
    Thais haver mobile controle?
    I missed melee features, any chance?
     
  7. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Right now I'm working on an upgrade for the Space Combat Kit, and then I will be making a very big update to this kit.
     
  8. pwalters34

    pwalters34

    Joined:
    Oct 23, 2014
    Posts:
    7
    When will there be AI documentation?
     
  9. cobaltBlue

    cobaltBlue

    Joined:
    Oct 25, 2011
    Posts:
    39
    I just bought the asset recently and I'm going through the codebase. It seems there are quite a few systems/scripts that aren't clearly documented, nor are there any examples of their usage. Stuff like the MechInput derived classes (MechInputSim, MechInputSimple) and also the derived classes for the Rigidbodycontroller like the MechController and MechControllerAnimated. As well as stuff like the AI System and Energy System...
    Is there any documentation other than the basic quick start guide or the Legacy UVC documentation that is more complete or up to date?
     
  10. VidemusOKC

    VidemusOKC

    Joined:
    Jun 28, 2020
    Posts:
    1
    Hi. I too just bought and imported this package.

    I've removed the old UI package as recommended (which reduced from hundreds of errors to a few errors), and installed iOS build support (which seems a silly requirement). Still getting some errors importing into a fresh (Core 3D) project. Any advice would be appreciated to get this working.

    I've gotten it down to just this error now on the more complex scenes:

    System.MissingMethodException: Method not found: void UnityEditor.PluginImporter.SetShouldOverridePredicate(System.Predicate`1<string>)
    UnityEditor.EditorAssemblies:processInitializeOnLoadAttributes (System.Type[])


    On the MCK_Simple Scene I get all this and the mech blows apart when started:

    System.MissingMethodException: Method not found: void UnityEditor.PluginImporter.SetShouldOverridePredicate(System.Predicate`1<string>)
    UnityEditor.EditorAssemblies:processInitializeOnLoadAttributes (System.Type[])

    The referenced script (Unknown) on this Behaviour is missing!

    The referenced script on this Behaviour (Game Object 'CameraController') is missing!

    UnassignedReferenceException: The variable shakenTransform of Shaker has not been assigned.
    You probably need to assign the shakenTransform variable of the Shaker script in the inspector.
    UnityEngine.Transform.get_parentInternal () (at <f1212ad1dec44ce7b7147976b91869c3>:0)
    UnityEngine.Transform.get_parent () (at <f1212ad1dec44ce7b7147976b91869c3>:0)
    VSX.Effects.Shaker.Awake () (at Assets/MechCombatKit/UVCFramework/Core/Rumbles/Scripts/Shaker.cs:37)
     
    Last edited: May 30, 2022
  11. Sirex1

    Sirex1

    Joined:
    Jul 20, 2020
    Posts:
    1
    Is this package in a workable state yet? VidemusOKC did you manage to make it run?
     
  12. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Of course it's in a workable state. What problem are you having?
     
  13. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Hi, the support email is the best way to reach me.

    The kit has been updated recently, if this problem persists let me know.
     
  14. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,314
    Hello,

    I just got this asset from the humble bundle, thanks for that!

    I would like just to use the AI mechs for my own space shooter game, make them run around in my levels with terrain and shoot at the player maybe. I only found that mesh prefabs for the player, where do I find or how can I create the ai / enemy prefabs?

    Thanks
     
    Last edited: Sep 11, 2022
  15. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Hi! The AI is set up under the Level > BaseMain > Dynamic > AI in the MCK_MainDemo scene. They use the same mech prefab as the player does, the Mech_Titan (or Mech_Scout if you wish).

    You can take any of the AI Instance objects there and create a prefab or use them in a different scene.

    I'll make a note to create a prefab to make this easier.
     
    Firlefanz73 likes this.
  16. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,314
    I'll make a note to create a prefab to make this easier.

    That would be really helpful, thanks! If possible one foreach...
     
  17. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,314
    Hi!
    Any news about prefabs for the Mech KI Enemies? That would be great. Running around a small range randomly and shooting in direction of some target gameobject would be perfect. But I guess that's something anybody can solve himself, but at least a basic prefab for each mech would be very helpful!

    Thanks :)
     
  18. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,314
    Mech AI Enemy Prefabs would be great! I made a prefob of the AI Instance right from the demo scene, and I can place it somewhere, it is animated and stands on the ground, I disabled the game agent script, how can I get the AI stuff working? Would be great if it could just run around a bit and shoot at the player if it is in range...

    Thanks
     
  19. Sr-Liermann

    Sr-Liermann

    Joined:
    Jan 7, 2015
    Posts:
    68
    Hello, any chance for melee?
    The enemy AI has support to non Mech like monsters for example?
     
  20. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Hi! Melee combat is not supported right now but may be in the future.
     
  21. khushalkhan

    khushalkhan

    Joined:
    Aug 6, 2016
    Posts:
    177
    Just imported it in fresh project in 2021.3.26f1 & 2022.3.3f1 playing demo scene hangs the unity, on disabling the mech gameobject solve the issue on enabling mech again hangs the unity
     
  22. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Hi, thanks for letting me know! I left a test gameobject in the MCK_MainDemo scene called 'GameObject', it's at the bottom of the list in the Hierarchy, just delete it and it should solve the issue. Sorry about that! The fix will be up on the store shortly.

    Let me know if you have any more issues.
     
    khushalkhan likes this.
  23. khushalkhan

    khushalkhan

    Joined:
    Aug 6, 2016
    Posts:
    177
    Deleted the 'GameObject' from scene still hangs unity. Disabling the mech gameobject solve it, so there is something wrong with a script on mech.
     
  24. khushalkhan

    khushalkhan

    Joined:
    Aug 6, 2016
    Posts:
    177
    'Titan' gameObject have issue
     
  25. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Are you getting an error? If so, please paste the whole error from the console. If not, can you make a short video of the issue?
     
  26. khushalkhan

    khushalkhan

    Joined:
    Aug 6, 2016
    Posts:
    177
    No error, just unity hangs when i play any scene with 'Titan' gameObject. Using unity LTS macbook m1 chip.
     
  27. galent

    galent

    Joined:
    Jan 7, 2008
    Posts:
    1,078
    I am also experiencing the same unity hanging in any scene becides the menu.

    I tried 2 versions of unity a 2020 and the most recent.
     
    khushalkhan likes this.
  28. galent

    galent

    Joined:
    Jan 7, 2008
    Posts:
    1,078
    OK, I narrowed down the source of the hanging... it is on the HeatStorage object attached to the Mechs (Titan and Scout), and well as the derivative (Mech_Titan_Layout2). To make the demo scenes work you have to edit all 3 prefabs and disable the HeatStorage objects attached. Not sure yet what they do, or which of the 2 scripts has the issue, but I did get it working so far.
     
  29. galent

    galent

    Joined:
    Jan 7, 2008
    Posts:
    1,078
    So, it turns out enabling the HeatStorage object (even with both scripts disabled) causes Unity to Hang. It's not clear to me where the source of the problem is, but it looks like the VSX resource system. I assume what's happening is when the HeatStorage object is accessed (either by lookup or direct reference) some kind of loop begins.

    The Update() method on ResourceContainer doesn't contain a loop, and neither does ResourceContainerUIController. The issue may be in a base VSX class, or (I suspect) in something accessing these classes once the gameobject is enabled.

    I'll pick at it when I get some time.

    Cheers
     
  30. khushalkhan

    khushalkhan

    Joined:
    Aug 6, 2016
    Posts:
    177
    @galent seems like the asset dev have no spare time for solving the issue. I have posted the issue 10 days ago, after that if we rate the asset one star due to lack of support still the asset devs will blame us for giving them poor ratings.
     
  31. galent

    galent

    Joined:
    Jan 7, 2008
    Posts:
    1,078
    Hi @khushalkhan ,

    Yeah, not sure where the asset dev is. Today/this week if he's in the US, I'd say he's 'distracted' by the US holiday (Independence Day). But 10 days... I went to the discord for the SCK, just to see if that's the place for MCK questions. no answer yet. His last post in support was the 29th of June (as far as I can tell).

    Either way, I press on. I'm pretty sure the issue is the ResourceContainerThresholdTrigger implementation. It's only currently in use in the HeatSource game object of the Mechs. The missiles use the ResourceContainer script, with no problems, as far as I can tell.
     
    khushalkhan likes this.
  32. galent

    galent

    Joined:
    Jan 7, 2008
    Posts:
    1,078
    Ok, scratch that. I'm at a loss.

    Enabling the game object, with both scripts disabled, still causes Unity to Hang. I tried looking for references in scene to the game object, but a bunch show up with no references that I can find.

    The trigger is the only difference between the missile MCK and the Heat Source, however I'm now not convinced the issue is there. The trigger is suppose to ... well trigger visual events (naturally). But I commented out all the unity Update, etc methods on the trigger... no effect.

    it's like there's some code that doing a runtime lookup for "HeatStorage" but I can't find any code doing that.

    Looking up by component doesn't make sense (but I searched anyway). The Trigger class is the only unique one related to Heat. Found nothing.

    Hmm... I hate hangs... no logs to find. I'm not motivated enough yet to do any deep diagnostics ... but I also hate unresolved errors.
     
    khushalkhan likes this.
  33. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Hey guys, very sorry about the delay, the fix is live on the store now. Let me know if you have any more issues and I'll be on it quickly.

    @galent @khushalkhan
     
    khushalkhan likes this.
  34. galent

    galent

    Joined:
    Jan 7, 2008
    Posts:
    1,078
    @Billy4184 Thanks!

    Just for the curious, what was causing the hang?
     
  35. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    The Resource Container Linker (on the mech's root gameobject) had a bug where it never exited a for loop. The heat storage resource container being on the mech was what made the code enter the loop and expose the bug.
     
  36. galent

    galent

    Joined:
    Jan 7, 2008
    Posts:
    1,078
    OH, and I just updated and replayed... not sure why, but the weapons layout isn't showing in the demo play mode (the list of weapons)

    Picture:
    DemoWeaponsListMissing.png
     
  37. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Yep thanks for the heads up there, I had limited time and I wanted to get the bug fix out asap. I will be testing all the scenes right away and making sure everything's 100%. That'll teach me for not doing a thorough test before making updates! o_O
     
  38. khushalkhan

    khushalkhan

    Joined:
    Aug 6, 2016
    Posts:
    177
  39. khushalkhan

    khushalkhan

    Joined:
    Aug 6, 2016
    Posts:
    177
    if (found) resourceContainers.RemoveAt(i);
    i--;

    was this the culprit?
     
  40. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Indeed, the 'i--' was outside the if statement, meaning the loop kept going back one step after taking a step forward, and never finished.
     
    khushalkhan likes this.
  41. DifinityRelin

    DifinityRelin

    Joined:
    Aug 9, 2021
    Posts:
    6
    Hey boss. Just started using the controller. Any plans to make a URP friendly version?
     
  42. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Hi there! What parts do you need to convert to URP that don't get converted automatically? There's a URP energy shield shader available but pretty much everything else should just convert over with the standard project conversion steps.
     
  43. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    All the demo scenes have now been fixed in the latest update.
     
  44. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,314
    Are there prefabs now for the enemy / ai mechs that can be used more easily in own projects?

    Thanks!
     
  45. DifinityRelin

    DifinityRelin

    Joined:
    Aug 9, 2021
    Posts:
    6
    Actually, nevermind. I won't need your demo in my game project. I can just keep it in a non-URP test project for reference.
     
  46. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    I'll be sure to add it in the next update, which will come in a few days.
     
  47. khushalkhan

    khushalkhan

    Joined:
    Aug 6, 2016
    Posts:
    177
    Needed a mobile inputs scene too, will make it myself if it is too much to ask for.
     
  48. ralfi07

    ralfi07

    Joined:
    Dec 1, 2022
    Posts:
    4
    What is your SQL server recommendation? MSSQL, MYSQL or another SQL?

    What is your advice?
     
  49. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Sorry I can't help with multiplayer as I haven't done any research or development into it, and it's not currently planned as a feature in the kit.
     
  50. ralfi07

    ralfi07

    Joined:
    Dec 1, 2022
    Posts:
    4
    zoom working for demo but My download asset project files not working, Why?

    I also tried to add robots as a mission but failed! I added Damageable etc. to the robots coming to the spawn area, but it didn't work. How can I fix this problem? In other words, generators, tanks, etc. In addition, I want to define enemy robots as missions.
     
    Last edited: Sep 28, 2023