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 Space Combat Kit (VSXGames) [RELEASED]

Discussion in 'Tools In Progress' started by Billy4184, Jul 14, 2015.

  1. xsocomx

    xsocomx

    Joined:
    Apr 18, 2018
    Posts:
    34
    Hi Billy, I seem to be having an issue when loading into the LoudOut scene. I am calling this with Scene Management from my own script. Everything works fine in the editor. But crashes the game from a build.
    Any ideas what may be causing this?
    I have also tested this with a fresh import of the space combat kit and performed build on default scenes and it does the same thing?
    Please help!
     
    Last edited: Mar 27, 2019
  2. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Can you send over a copy of the build to contact at vsxgames dot com?
     
  3. xsocomx

    xsocomx

    Joined:
    Apr 18, 2018
    Posts:
    34
    Just tested a build from a fresh import and working in your demo scene. Seems like theres something wrong my end. Not sure what tho
     
  4. xsocomx

    xsocomx

    Joined:
    Apr 18, 2018
    Posts:
    34
    My build is a couple of gigs in size now. Might be a bit big to send over. Plus it has other assets iv purchased.
     
  5. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    I'd recommend checking out the log file.
     
  6. xsocomx

    xsocomx

    Joined:
    Apr 18, 2018
    Posts:
    34
    ok so I have figured out its my playership prefab thats causing the issue. The demo prefab works perfectly. Now to figure out whats different...
     
    Billy4184 likes this.
  7. xsocomx

    xsocomx

    Joined:
    Apr 18, 2018
    Posts:
    34
    the only difference between mine and yours is the mesh and the cameras. Whats causing this?
     
  8. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    There are quite a few problems that can cause code to crash.

    Since this is filling the thread with comments about an issue that may be unrelated to SCK, let's take this to email. If you send me your log file to contact at vsxgames dot com I will take a look, just in case it turns out to be related in some way.
     
  9. xsocomx

    xsocomx

    Joined:
    Apr 18, 2018
    Posts:
    34
    Email Sent Billy.
     
  10. xsocomx

    xsocomx

    Joined:
    Apr 18, 2018
    Posts:
    34
    Any thoughts?
     
  11. joshua_42

    joshua_42

    Joined:
    Jun 23, 2016
    Posts:
    104
    Hi Billy,
    I'm having trouble with the Loadout menu - I've changed the Start Mission button to change the GameState to Gameplay but whatever ship I choose there seems to be no reference to it or the Game Agent. In the GameStateManager i have LoadOutMenu as the starting state.
     
  12. xsocomx

    xsocomx

    Joined:
    Apr 18, 2018
    Posts:
    34
    You need to set the ships in the player items prefab. However, you may very well run into the same show stopper I did and will not be able to use any mesh other than the ones provided.No hint of a fix anywhere in sight.
     
  13. joshua_42

    joshua_42

    Joined:
    Jun 23, 2016
    Posts:
    104
    I replaced the mesh in one of the space fighter prefabs and it worked fine. And I made a ship from scratch with my own meshes.
     
  14. xsocomx

    xsocomx

    Joined:
    Apr 18, 2018
    Posts:
    34
    Does it work in your build? In the Loadout sene? Mine was fine in the editor. But later found it crashed the game when loading the scene in my build..
     
    Last edited: Mar 31, 2019
  15. ppcsoldier

    ppcsoldier

    Joined:
    Dec 30, 2018
    Posts:
    5
    Ok, I am trying to mount the prefab gun and when I test it won't stay on aircraft. The projectile gun flies forward!
     
  16. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Hey guys, I seem to have missed a notification here and then didn't get any new notifications.

    I'll take a look tonight and get back to you. However it's strange that the log file does not provide any real information.

    I didn't quite understand what you meant by "whatever ship I choose there seems to be no reference to it or the Game Agent", also what happens when the Gameplay scene loads?

    Can you provide more information, perhaps a video? Is the gun mount a child of the ship?
     
  17. frankadimcosta

    frankadimcosta

    Joined:
    Jan 14, 2015
    Posts:
    203
    I have a little question. In my "Cargo excort" scene, my hero must excort a big Cargo spaceship to the HyperJump portal. Enemy fighters must attack mainly the cargo ship, not the hero-fighter. How can I obtaing this behaviour ? TNX !
     
  18. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Take a look at the Group Manager script (found on the FriendlyGroupManager and EnemyGroupManager objects in the GameplayDemo scene).

    If you go to the UpdateTargetDistribution method, you can see how you can set the selected targets for the AI by grabbing their radar and calling the SetSelectedTarget method.

    Let me know if you need any more clarification.
     
    frankadimcosta likes this.
  19. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    Sorry still having problems with Rewired now its not working at all before it was working fine with my Thrustmaster Tflight H.O.T.A.S X but now nothing what am I doing wrong ?
     
  20. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    I cannot tell you anything useful without any information. If it was working before and now it's not, then it's very likely that you changed something.

    Have you tested to make sure your device is detected by Rewired?

    Have you tested to make sure the Rewired input maps are set up correctly? Is the HOTAS template being used? The Rewired developer has very extensive documentation to help you set up and debug the asset.
     
  21. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    I have tested the device it works in Windows 7 Professional but somehow its not working for this and I am using both the general H.O.T.A.S and the TFlight H.O.T.A.S X template and yet still nothing I had it working before so I must have done something wrong but can't work out what
     
  22. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    I suggest you try in a fresh project with SCK and Rewired. If that doesn't work, I'll be happy to do whatever it takes to make sure the integration works as advertised. If it works, then you can compare the setup with the non-working project to see what the issue is.
     
  23. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    OK Well yes I did a few fresh installs and still getting the same result unfortunately
     
  24. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Is that a clean project (empty except for SCK and Rewired integration)?
     
  25. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    What version of Unity are you using? Has this changed recently?
    What version of Rewired are you using? The latest version is 1.1.24.0.
    Have you updated Windows recently (added patches sometimes that changes usb drivers)?
    Same USB ports as before?
    Are you using the latest ThrustMaster usb drivers? [The latest is 2018.FFD.2 ]
    https://support.thrustmaster.com/en/product/tflighthotasx-en/

    If create an empty project with just Rewired and build the ControlMapperDemo. Without having to map anything it should detect everything and everything should work. Then at least you can sanity check that part.
    Rewired\Extras\ControlMapper\Examples\ControlMapperDemo

    Since I do not have SCK I am not sure about that part. Does the SCK templates/integration work just off the HOTAS template or does it also have a TFlight HOTAS X template specific mapping?
     
    Last edited: Apr 2, 2019
    Billy4184 likes this.
  26. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    Yes totally clean install except for SCK and Rewired
     
  27. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    Right I had to use Unity 2017.4.23f1 as I tried to use the latest Unity and SCK dosen't work with it ( well I can't make it work) I will create an empty Rewired demo project as you suggest and see if I can't get it to work that way Got the latest version of Rewired but haven't downloaded the Thrustmaster USB drivers the latest ones so I shall do that as well
     
  28. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    What version of Unity were you not able to make SCK work in?
     
    Last edited: Apr 2, 2019
  29. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    Also each Rewired version is different for each unity version. If you were working with Unity 2018.x you have to download Rewired for the 2018 branch. If you go back to 2017 you have download Rewired for 2017 branch. Unfortunately the unity asset is stored in the same directory. This has been an issue since Unity 5.x for all unity assets.
     
  30. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    Version 2018 3.4 and most of the version 2018's I suddenly can't make them work
     
  31. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    OK Thank you
     
  32. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
  33. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
  34. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Just to be clear, it's only the Rewired integration that's not working in Version 2018 3.4, not any other part of the SCK?

    Please check:

    1. Does Rewired work in a project that doesn't involve SCK, in Version 2018 3.4? If so, it's Rewired that's at issue, and longroadhwy's suggestions may be of help.

    2. If it's only SCK's integration not working, then please contact me via email (contact at vsxgames dot com) and I will take you through some steps to debug the issue.

    Just to be clear, I cannot debug Rewired, but if Rewired is working properly and SCK is not, I'll be glad to help until it's fixed.
     
  35. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    Sorry the whole package doesn't work in version 2018.3.4
     
  36. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    What happens when you import it?
     
  37. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    This:

    ''Assets/SpaceCombatKit/PostProcessing/Editor/PropertyDrawers/MinDrawer.cs(6,34): error CS0104: `MinAttribute' is an ambiguous reference between `UnityEngine.MinAttribute' and `UnityEngine.PostProcessing.MinAttribute'''
     
  38. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,608
    Everyone should always do this first when trying to figure out a controller-related problem in Rewired:
    http://guavaman.com/projects/rewire...l#debug-information-diagnosing-input-problems

    This gives actual information we can use to understand what might be happening instead of trying to slowly dig out information piece at a time and making guesses. This will tell you if the problem has anything to do with Rewired. If everything checks out here, then it's probably in the integration side of things.
     
    Billy4184 likes this.
  39. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    OK first of all that's not a problem with SCK, it's a problem with Unity's post processing package, which conflicts with their own engine.

    As I've pointed out multiple times on this thread, you can easily fix this by opening the offending script and replacing MinAttribute with UnityEngine.PostProcessing.MinAttribute.
     
  40. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    OK where do I find the script?
     
  41. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449

    OK Thanks
     
  42. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    The error gives you the exact path where the file can be found.

    Also you can double click on the error to open the script.
     
  43. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    OK Thanks
     
  44. juris3d_unity

    juris3d_unity

    Joined:
    Nov 14, 2017
    Posts:
    57
    Hello! I have a question that I kind-of asked before, but I want to keep this idea alive :) And, it is "simple idea" to get this asset also to Unreal Engine store. Yeah. UE4 store has just one old and semi-abandoned Space Kit. Yours could fly there, pun intended. You know, recently architectural asset that was here went also to UE store, and it is a great hit there (i am talking Sci-Fi Industrial Level Kit 2.0), I also bought that, it is great. Could this super space kit come there too? :)
     
  45. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    I'm definitely keeping it in mind, but right now I am focused on taking this asset to the next level, and launching my own game into orbit!
     
  46. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Hello everyone, here's a WebGL demo of the updated Vehicle Combat Radar, which forms part of the Space Combat Kit.

    Demo.png

    This is a complete re-write that includes:

    Easily add information to your Trackable

    TrackableVariablesInspector.png

    Now, the Trackable contains serializable dictionaries that you can use to store variables and look them up with a string key. This makes it very easy to add your own information to the trackable in the inspector.

    Creating dictionaries for your own classes and structs is also very easy to do.

    Add dynamic variables to to your Trackable in the inspector

    Let's say you want to track the health of a target, which is a variable that can change any time. Instead of having to access the scripts containing the information (e.g. the Health script) via code to retrieve the health value, you can directly link variables and methods to values in the Trackable's dictionaries, without writing any code.

    TrackableLinker.png

    Also, the update includes some fill bars and text boxes that allow you to retrieve and display content from the Trackable's dictionaries without having to write any code.

    Easily add target selectors to your radar

    In previous versions, the radar and target selection was all done in one big script. Now, the radar does the target tracking, and a separate script handles the target selection, making it easy to add more target selectors.

    Target selectors can be set up with any criteria for the teams or trackable types that it can select.

    Ability to target subsystems

    With this update, you can set up hierarchies of trackables that make it possible to target and cycle through subsystems of a target. Trackables now have a list of 'child trackables' for accessing subsystems.

    No interfaces, simple extendable base classes

    As mentioned in previous comments, I've realized interfaces are not the best way to make scripts modular and flexible especially for beginner coders. This update does away with all of the interfaces and uses simple base classes that have a relatively small, well-defined scope. This makes it easier to understand things and add your own functionality at exactly the right points.

    Add functionality with Unity Events

    As mentioned in previous comments, this update (and the update for the rest of the Space Combat Kit) makes much use of Unity Events to make it easy for you to create your own scripts and add your functionality at key points without having to modify core components.

    Much more!

    Besides these big ones, there are a lot of small improvements to the code design to make using the Vehicle Combat Radar as intuitive as possible.

    What's next

    The next step is to finish the VCR documentation and update the package.

    After that, I will be working to get the Space Combat Kit updated. The VCR is the biggest and most complex component of the SCK, and it was among the last parts I had left to do, so it shouldn't be much longer until it's ready.

    Thanks for waiting and I know this is going to be worth it for you!
     
  47. frankadimcosta

    frankadimcosta

    Joined:
    Jan 14, 2015
    Posts:
    203
     
    Billy4184 and JFI66 like this.
  48. rickytsmith

    rickytsmith

    Joined:
    May 22, 2013
    Posts:
    27
    Hi Billy - The new radar and trackable system looks amazing - thanks for your hard work and dedication. With quite a few changes in the basic structures and move from interfaces to base classes, how complex is it likely to be to upgrade an existing project built on the previous version ?
     
  49. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Thanks! I hope I can make something that does everything you want it to and is easy to use.

    It really depends on how much you have changed/added. One thing I can tell you is that the new code is much better structured and easier to understand, and I am working on good documentation that will go into the radar package update.

    I also recommend that you don't integrate the updated radar package into the previous version of the space combat kit, as the update for the space combat kit will make this much easier (in fact it will use the up-to-date radar package from now on).

    So to answer your question, it might need some work, but it should be pretty straightforward.
     
  50. navy3001

    navy3001

    Joined:
    Jun 1, 2017
    Posts:
    23
    can you upload a demo of the player controlling the capital ship?