Search Unity

Unity 3D Game Kit Official Thread

Discussion in 'Community Learning & Teaching' started by Aurore, May 9, 2018.

  1. Runemark

    Runemark

    Joined:
    May 23, 2013
    Posts:
    188
    The idea behind the gameplay counter is quite simple.
    • when it receives a game command with the correct interaction type it increments the current count parameter.
    • when the current count value reaches the target count value, the gameplay counter fires the OnTargetReachedSendCommand and the OnTargetReachedSendAction events.
    If you have 3 mobs and a door on the scene, and you want to open the door after all the 3 mobs are slain you should do this:
    • Create a Gameplay Counter. Set the interaction type to whatever you like (for the sake of this example, lets assume you set it to Activate.
    • Add a SendGameCommand to the mobs. Assign the GameplayCounter game object to the Interactive Object field, and set the Interaction Type to the one you set in case of the counter (Activate this case). You can also check the OneShot option, to make sure one mob can't increment the counter multiple times.
    • Navigate to the Damageable component on the mob. Add a new item under the OnDeath part. Drag the previous SendGameCommand component here and select the Send() method from the dropdown.
    At this point, when the mob dies (Damageable.OnDeath), the SendGameCommand component will be triggered, and send the Activation message to the Gameplay Counter.
    • On the Gameplay Counter, the Current Count should be 0. Set Target Count to how many mobs do you have (this case 3).
    • Add a SendGameCommand component to the Gameplay Counter object, and drag this it to the OnTargetReachedSendCommand field. Set the interaction type to whatever you like, it doesn't need to be the same as before.
    • The door game object should have a Simple Translator component. Set the Interaction Type to the same as you did in case of the SendGameCommand, and set the other parameters as your door should work (or leave as it is if you using the door prefabs)
    I hope this helps, if not, ask again! :D
     
    DaftPuzzler likes this.
  2. espuertaxd

    espuertaxd

    Joined:
    Sep 5, 2019
    Posts:
    6
    Thank you again for response, i have new problem now, i tried to create trigger cut scenes using movie player now, and i am having an issue because sometimes it doesn't trigger at all, but sometimes it does, if you can give me some tips how to play video using trigger in 3d game kit, it would be a big help. I did tried to search in youtube or google, but those tuts are not suitable in 3d game kit :( thank you anyway, you're saving me!
     
    Runemark likes this.
  3. slogtenberggdci

    slogtenberggdci

    Joined:
    Oct 13, 2019
    Posts:
    1
    Is there a way to use the movements of the navmesh agent control track to record keyframes of the model's position. Or more simply, have the navmesh agent control track and the animation track work together with the Playable Director. I can ether have the animation working but hand tweak the offset to keep the root motion on the ground, or have the navmesh work, but animation need to be turned off. The transform tween track doesn't effect the animation's position and rotation because the animation's offset has all the control. I have to copy each float in the vectors instead of the transform property.

    Any help wound be appreciated.
     
  4. BadriRusadze

    BadriRusadze

    Joined:
    May 17, 2019
    Posts:
    9
    hello , im adding fbx walls and adding mesh colliders but she still walks into walls , how can i fix this
     
  5. pidgi2001

    pidgi2001

    Joined:
    Oct 12, 2019
    Posts:
    6
    OK, do not bother. I found a way, without scripting, to start or stop the platforms, using two devices (PressurePadTrigger). I am now trying to toggle the movements, meaning to start/stop a platform but with a single device.

    EDIT: OK, found a workaround. Now, a Pressure Pad Trigger sets a platform to move, then another shot ont he Pad makes it stop. Furthermore, I think I have found a way to make a door open or close the same way.
    Anyone interested in the solutions?
     
    Last edited: Nov 22, 2019
  6. pidgi2001

    pidgi2001

    Joined:
    Oct 12, 2019
    Posts:
    6
    Are your walls placed in the Environment layer?
     
  7. junctionboss

    junctionboss

    Joined:
    May 11, 2014
    Posts:
    214
    Not sure if its ok to ask you this but you seem to have a good handle on 3dgamekit use so:

    Loading kit from store , dragged player onto terrain and like last time, falls through
    I found post by someone here noting to try 'level' or such,,no luck so i tried collider , WORKS, no longer falls through, but player doesn't move. Checking , but wanted to post this in case what I'm experiencing is something to do with my use of 2019.2.16f1

    ty
     
  8. Runemark

    Runemark

    Joined:
    May 23, 2013
    Posts:
    188
    Hey!
    I think this is a layer issue. Either the character layer is wrong or the ground layer. The latter is important because the ground check uses a layer mask if I recall it correctly.

    By not moving what do you mean? Does it play an animation? What state is it in the animator?
     
  9. junctionboss

    junctionboss

    Joined:
    May 11, 2014
    Posts:
    214
    Sorry for delay in answering, busy time of year ),first off I'm not using plane, 3d game kit comes with, does this even work, on terrain? Just wanted to make sure I made that clear.
    On play, cursor keys ,nor wsad move character. She doesn't go forward sideways, nothing. I'll check animator, but doesn't this come ready via 3d game kit ?
     
  10. junctionboss

    junctionboss

    Joined:
    May 11, 2014
    Posts:
    214
    Checked animator, see nothiing wrong, but then I'm not entirely familiar with complexity.
     
  11. pidgi2001

    pidgi2001

    Joined:
    Oct 12, 2019
    Posts:
    6
    Is your terrain in the environment layer? If default layer, Ellen falls through. Just use the small gizmo on top right in the inspector, and from the drop down select “Environment”. Then, for the ennemis to walk and run on it, re-bake the Nav Mesh Surface
     
  12. neighborlee

    neighborlee

    Joined:
    Jan 26, 2016
    Posts:
    50
    Hm, well now its worse, I chose environment, it asked if I wanted to choose yes and change all children so I hoped and went with yes, now player starts in sky, and falls through and I can't see player ellen anymore.

    I have no enemies atm so it doesn't apply , and now getting this in console:

    NullReferenceException: Object reference not set to an instance of an object
    Gamekit3D.PlayerController.SetTargetRotation () (at Assets/3DGamekit/Scripts/Game/Player/PlayerController.cs:322)
    Gamekit3D.PlayerController.FixedUpdate () (at Assets/3DGamekit/Scripts/Game/Player/PlayerController.cs:198)


    what now ? ;)
     
  13. emmanuella240698

    emmanuella240698

    Joined:
    Sep 27, 2018
    Posts:
    1
    so, im using unity 2019.2, tried making a new scence but all the prefab assets are missing im left with only gizmos to stare at. i did a ton of debugging just to get it to run, im exhausted at this point please tell me an easy fix
     
  14. junctionboss

    junctionboss

    Joined:
    May 11, 2014
    Posts:
    214
    what prefab assets do you refer to ?
    thx
     
  15. MacBolan

    MacBolan

    Joined:
    Jan 3, 2020
    Posts:
    1
    Errors abound.

    I've been hearing a lot of good things about Unity, and I've gotten fairly adept with DAZ, so I thought I would finally try to 'up my game' so to speak. Maybe I should have started off in the kiddie-pool, but I'm not exactly a noob to development, so I figured "What the heck - let's dive in!", so I started off with this '3D Game Kit'.

    Running on Win10 x64 (24-core TR, 64GB RAM, and a 2080Ti)
    I am using a fresh clean install of Unity 2018.4.14f1 Personal (the latest version available).
    I used the Window->Asset-Store to download/install the '3D Game Kit' (to X:\Unity\), and named it 'My 3D Game'.

    Received a ton of issues right out of the gate (43 errors, mostly namespace 'not found' or 'does not exist in...', and 60+ warnings). I thought that maybe it just needed to be restarted, so I did that and reloaded the game, only to receive a list of errors (Unity Package Manager errors) during the load process reporting a host of 'invalid dependencies' (could not be found) ...

    The namespaces identified by the 'not found' or 'does not exist in...' compiler errors in the IDE include:
    DeploymentTargetLogger
    IRemoteTestResultDataFactory
    Unity.CodeEditor
    IExternalCodeEditor
    ResponseFileData
    UnityEngine.UIElements
    VisulaElements

    (I included several examples of the full errors at the bottom of this post)

    Am I just using an incompatible version of Unity, or have I neglected to download and install some prerequisites? At this point, I am still assuming it is something I am doing wrong, or have failed to do, but Unity provides absolutely zero direction on how to deal with these issues, so i am hoping some bright star in the community will recognize my stupidity and get me pointed in the right direction. I am fully aware of what the errors mean, I just have no experience with anything Unity.

    During my own 'investigation', I hunted down and edited one of the files with a 'does not exist in Unity' error (X:\Unity\My 3D Game\Library\PackageCache\com.unity.ide.rider@1.0.8\Rider\Editor\Discovery.cs), using Visual Studio Code to change the offending statement :
    using Unity.CodeEditor;
    ...to...
    using CodeEditor;
    The result was that that particular error changed from 'does not exist in Unity' to just 'not found'. This tells me I am in fact looking at the right file, and that my changes do in fact have an effect.
    When I use Visual Studio 2017 to open the solution, and edit a script (any script), Intellisense offers no 'CodeEditor' under any namespace ('Unity', 'UnityEngine', nor 'UnityEditor'). This certainly appears to be a case where the libraries being referenced do not match with the code in the project. But that still leaves the question of what to fix, and how to fix it. (Update the Libraries, or update the code.)

    Any help would be greatly appreciated.


    Example Errors (not a complete list):
     
  16. pidgi2001

    pidgi2001

    Joined:
    Oct 12, 2019
    Posts:
    6
    Could you, please, send me a picture of your Hierarchy? I did make a game, entirely based on 3D Game Kit, following the challenge of never using coding, and it works perfectly. My Ellen walks on Plane and/or Terrains, there is even a level where I have 4 Terrains (completely separated one from another) AND a Plane: Ellen and the ennemies walk/run/jump without a problem. I thus suspect that it could be a problem with the way you did set up your Hierarchy.

    By the way, I made a game, it is not commercial at all, but I would love to have testers trying the game, for feedback. Where and how could I find that? If you want, I could send you my source, if you send me yours. I could thus study what you did, and you could study mine. Two brains are better than one!
     
  17. pidgi2001

    pidgi2001

    Joined:
    Oct 12, 2019
    Posts:
    6

    Strange. I do use and compile everything in 3D GameKit with the Editor version 2019.2.17f1 without any problem. Maybe you could try loading that version? I think that version 2018.4.14f1 is not the most recent...
     
  18. zaki4797

    zaki4797

    Joined:
    Jan 7, 2020
    Posts:
    2
     
  19. zaki4797

    zaki4797

    Joined:
    Jan 7, 2020
    Posts:
    2
  20. Crayzato

    Crayzato

    Joined:
    Jan 17, 2020
    Posts:
    1
    When I make a new scene using this, it doesn't have the pause menu or the lives at the top, and I can't find a way to add them. They show up in the default levels but I can't figure out how to make them appear in my scenes. Does anyone know how to fix this? I've tried finding out how to, but everyone seems to have them when they make a new scene automatically.
     
  21. pidgi2001

    pidgi2001

    Joined:
    Oct 12, 2019
    Posts:
    6
    Do you create your new scene with the "File -> New Scene Ctrl+N" or the "Kit Tools->Create New Scene…"? The former just creates a blank new scene. The last one makes a Game Kit New Scene, with the Pause menu and the lives.
     
unityunity