Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Realistic FPS Prefab [RELEASED]

Discussion in 'Assets and Asset Store' started by Deleted User, Apr 5, 2013.

  1. kennyc222

    kennyc222

    Joined:
    May 7, 2017
    Posts:
    3
    Will you add Door/KeyCard system?
     
  2. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    576

    I found a bug where if your streaming scenes and your bullet marks are attached to objects that get unloaded your soon get this error. Before I had 100 bullet marks per mark so did really notice it untill I set the marks to 30.
    To fix is a simple fix Just add this to around Line 424 on WeaponEffects.cs
    Code (CSharp):
    1.  
    2.  
    3. }
    4.             //apply inverse scale of the collider that was hit to empty game object's transform
    5.             tempObjTransform.localScale = tempScale1;
    6.             //set parent of bullet mark object to empy game object and set localScale to (1,1,1)
    7.             cloneTransform.parent = tempObjTransform;
    8.  
    9. //////ADDED
    10.             //Un-parent, incase of scene unload and null error
    11.             tempObjTransform.parent = AzuObjectPool.instance.transform;
    12. ///////ADDED END
    13.  
    14.             //apply hit mark's initial scale to hit mark instance
    15.             cloneTransform.localScale = scale;
    16.             //randomly scale bullet marks slightly for more natural visual effect
    17.             if (!meleeAttack) {//not a melee weapon
    18.  
    19.  
    It will transform to the correct place and then parent back to the pool transform.
    This bug has been driving me crazy for ages and glad it eventually showed up in the editor.
     
    JamesArndt likes this.
  3. Takahama

    Takahama

    Joined:
    Feb 18, 2014
    Posts:
    166
    Hello! i have the exact same issue and since @Azuline-Studios is away, there is no help on sight :(
    i managed to made FPS body clone small tho, it doesnt show up. but since its model is still in the game it affects performance
    Here is my bad solution;
    in PlayerCharacter.cs
    replace lines 269 to 273 with this

    Code (CSharp):
    1. //scale down arms and head of first person visible body object, so they don't show in the camera view
    2.         if(fpBodyAnim.GetBoneTransform(HumanBodyBones.Head)){
    3.             fpBodyAnim.GetBoneTransform(HumanBodyBones.Head).localScale = new Vector3(0.0001f, 0.0001f, 0.0001f);
    4.             fpBodyAnim.GetBoneTransform(HumanBodyBones.RightUpperArm).localScale = new Vector3(0.0001f, 0.0001f, 0.0001f);
    5.             fpBodyAnim.GetBoneTransform(HumanBodyBones.LeftUpperArm).localScale = new Vector3(0.0001f, 0.0001f, 0.0001f);
    6.             fpBodyAnim.GetBoneTransform(HumanBodyBones.Hips).localScale = new Vector3(0.0001f, 0.0001f, 0.0001f);
    i still require help from @Azuline-Studios or anyone about that issue. How do i get rid of FPS body clone?!
     
  4. Infantry

    Infantry

    Joined:
    Nov 22, 2017
    Posts:
    7
    Hello Sir,

    Awesome mod for Unity BTW just have two issue I need to fix to make my program fully operational.

    1) I work with shooting simulators where players use laser pistols and rifles to shoot at a screen and the hit is detected on the fall of the laser on the screen using a mouse down command.

    Just need to replace the FPS prefab with a OnMouseDown (Right click) per shot with RayCast so when players shoot at the screen the bullets travel to the hit position instead of manually aiming for the character using standard controls. How do I modify the code for this purpose?

    2) I need my character to start with a pistol with unlimited ammunition. How do I modify this script?

    Thank you,
    Brad Crawford
    CEO, The Tactical Experience LLC
    www.tacticalexperience.com
     
  5. twangydave

    twangydave

    Joined:
    Mar 30, 2017
    Posts:
    41
    Hi Tony,

    Been getting the save system up and running - great package mate, works lovely. I'm trying to do the same thing as here - get the level to load from the check points on death. Everything is working great other than this. I'm using version 127 and the code looks a bit different to this in the relevant section. I've tried a few things but not been able to get it to work - any suggestions for the version that I'm using? Cheers!
     
  6. Oderus_Urungus

    Oderus_Urungus

    Joined:
    Jun 8, 2017
    Posts:
    96
    I have noticed with the glass object, that if you make it a child of something, say a window frame, it doesn't leave hit marks on the glass. Normally, not a problem, but I have sliding glass doors that open when the player enters a trigger, so I need the glass to be a child of the sliding door frame.

    Any suggestions?

    Edit- I just thought of something. I'm going to try to parent the door frame to the glass and see if that works.

    Edit- Yep, that works.
     
  7. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    Hi @twangydave - I think these steps will work: In FPSPlayer.cs, find the Die() method. It should be at the very bottom of the script. Replace this code (or whatever is similar):
    Code (csharp):
    1. GameObject llf = Instantiate(levelLoadFadeObj) as GameObject;//Create instance of levelLoadFadeObj
    2. //call FadeAndLoadLevel function with fadein argument set to false
    3. //in levelLoadFadeObj to restart level and fade screen out from black on level load
    4. llf.GetComponent<LevelLoadFade>().FadeAndLoadLevel(Color.black, 2.0f, false);
    with this:
    Code (csharp):
    1. if (PixelCrushers.SaveSystem.HasSavedGameInSlot(0)) {
    2.     PixelCrushers.SaveSystem.LoadFromSlot(0);
    3. } else {
    4.     GameObject llf = Instantiate(levelLoadFadeObj) as GameObject;//Create instance of levelLoadFadeObj
    5.     //call FadeAndLoadLevel function with fadein argument set to false
    6.     //in levelLoadFadeObj to restart level and fade screen out from black on level load
    7.     llf.GetComponent<LevelLoadFade>().FadeAndLoadLevel(Color.black, 2.0f, false);
    8. }
     
    twangydave likes this.
  8. twangydave

    twangydave

    Joined:
    Mar 30, 2017
    Posts:
    41
    You are the man as always! I can already see where I was going wrong - will get this done when I get home - many thanks for your help and for Save System which is a really great asset.
     
  9. Xain

    Xain

    Joined:
    Aug 3, 2013
    Posts:
    67
    Hello everyone, I'm trying to make weapon change ui like half life series. Where you can see your weapons on UI. But I just can't figure out how to get the current weapons on inventory and show their images.

    Any clue would be appreciated.
     

    Attached Files:

    OZAV likes this.
  10. SpacemanSam13

    SpacemanSam13

    Joined:
    Dec 22, 2016
    Posts:
    7
    Hey everyone I ended up fixing this and want to post the fix in case someone else needs it! So if you go into PlayerCharacter.cs starting at line 269 this controls the scale of the render of the body parts. You can see that it scales down the head and both arms. So i just copied the code and made new lines for LeftUpperLeg, RightUpperLeg, Spine, and Hips. I hope this helps anyone that hits the same problem!

    Code (CSharp):
    1. //scale down arms and head of first person visible body object, so they don't show in the camera view
    2.         if(fpBodyAnim.GetBoneTransform(HumanBodyBones.Head)){
    3.             fpBodyAnim.GetBoneTransform(HumanBodyBones.Head).localScale = new Vector3(0.0001f, 0.0001f, 0.0001f);
    4.             fpBodyAnim.GetBoneTransform(HumanBodyBones.RightUpperArm).localScale = new Vector3(0.0001f, 0.0001f, 0.0001f);
    5.             fpBodyAnim.GetBoneTransform(HumanBodyBones.LeftUpperArm).localScale = new Vector3(0.0001f, 0.0001f, 0.0001f);
    6.             fpBodyAnim.GetBoneTransform(HumanBodyBones.LeftUpperLeg).localScale = new Vector3(0.0001f, 0.0001f, 0.0001f);
    7.             fpBodyAnim.GetBoneTransform(HumanBodyBones.RightUpperLeg).localScale = new Vector3(0.0001f, 0.0001f, 0.0001f);
    8.             fpBodyAnim.GetBoneTransform(HumanBodyBones.Spine).localScale = new Vector3(0.0001f, 0.0001f, 0.0001f);
    9.             fpBodyAnim.GetBoneTransform(HumanBodyBones.Hips).localScale = new Vector3(0.0001f, 0.0001f, 0.0001f);
    10.         }else{
    11.             Debug.Log("<color=red>Player model avatar error:</color> Please check your player character setup and animator avatar reference.");
    12.         }
     
  11. twangydave

    twangydave

    Joined:
    Mar 30, 2017
    Posts:
    41
    Thanks Tony - that's working great - it does disable the screen fade out on death though (works great on fading in still) - any way of changing that?
     
  12. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    It's a little more complicated but possible. You'll need to move the PixelCrushers.SaveSystem code out of FPSPlayer.cs, and into the LevelLoadFade script's DoFadeOut method. Add it near the end, so that it checks for a saved game and loads the game if it exists. If not, use the Application.LoadLevel that's there.
     
  13. SpacemanSam13

    SpacemanSam13

    Joined:
    Dec 22, 2016
    Posts:
    7


    Thank you this worked great!
     
  14. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    576
    If you want to remove first person body fully you can with a few edits to PlayerCharacter.cs

    1. First make sure on the CameraController.cs script which is on the Main Camera, you set 'Allow First Person' to off.

    2. In PlayerCharacter.cs line 258
    Code (CSharp):
    1. walkerComponent.PlayerCharacterObj = this.gameObject;
    2. //ADDED
    3.         if (CameraControlComponent.allowFirstPerson) {
    4. //ADDED END
    5.             ///Set up first person visible body object///
    Then Line 284
    Code (CSharp):
    1.         fpBodySkinnedMesh.gameObject.GetComponent<Renderer> ().materials = mats;
    2.             }
    3. //ADDED
    4.         }
    5. //ADDED END
    6.  
    7.         //position third person weapon models in player character's right hand
    2. In Update Function line 326
    Change to this
    Code (CSharp):
    1. void Update () {
    2.  
    3.         if (anim.isInitialized && Time.timeScale > 0.0f) {
    4.             if (CameraControlComponent.allowFirstPerson) {
    5.                 if (!fpBodyAnim.isInitialized)
    6.                     return;
    7.             }
    8.  
    9.  
    10.             WeaponBehaviorComponent = FPSPlayerComponent.WeaponBehaviorComponent;
    3. Then for every ' fpBodySkinnedMesh ' // ' fpBodyTransform ' // ' fpBodyAnim ' add this just above
    Code (CSharp):
    1. if (CameraControlComponent.allowFirstPerson)
     
    SpacemanSam13 and Takahama like this.
  15. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    576
    In WeaponBeahavour.cs add some code;
    Code (CSharp):
    1. public string WeaponName;
    2. public Sprite WeaponIcon;
    Then on your UI you can set something like;
    Code (CSharp):
    1. public Text WeaponName;
    2. public Image WeaponIcon;
    3. public PlayerWeapons playerWeapons;
    4.  
    5. void Update()
    6. {
    7. if(WeaponName != null)
    8. WeaponName.Text = playerWeapons.CurrentWeaponBehaviorComponent.WeaponName;
    9.  
    10. if(WeaponIcon != null)
    11. WeaponIcon.sprite = playerWeapons.CurrentWeaponBehaviorComponent.WeaponIcon;
    12. }
     
    Xain likes this.
  16. twangydave

    twangydave

    Joined:
    Mar 30, 2017
    Posts:
    41
    Thanks Tony - I need to get better at digging into the scripts so I'll have a play - I'm well backed up if I make a mess! All the best.
     
  17. Takahama

    Takahama

    Joined:
    Feb 18, 2014
    Posts:
    166
    i didnt get 3rd step :(
    which lines require "if (CameraControlComponent.allowFirstPerson)"
     
  18. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    576
    If you use mono develop press '' ctrl + F '' and enter fpBodySkinnedMesh , it will show all lines using this and use the down arrow to cycle

    then just add if (CameraControlComponent.allowFirstPerson) above the line;

    but its its part of a bigger method like this
    Code (CSharp):
    1. foreach (SkinnedMeshRenderer Mesh in fpBodySkinnedMesh) {
    2.                         Mesh.enabled = true;
    3.                     }
    code it like
    Code (CSharp):
    1. if (CameraControlComponent.allowFirstPerson) {
    2.                         foreach (SkinnedMeshRenderer Mesh in fpBodySkinnedMesh) {
    3.                             Mesh.enabled = true;
    4.                         }
    5.                     }
    couple of lines for e.g
    OLD
    Code (CSharp):
    1. anim.SetInteger ("WeaponType", WeaponBehaviorComponent.tpWeaponAnimType);
    2.                     fpBodyAnim.SetInteger ("WeaponType", WeaponBehaviorComponent.tpWeaponAnimType);
    3.                     lastWeapon = WeaponBehaviorComponent.weaponNumber;
    NEW
    Code (CSharp):
    1. anim.SetInteger ("WeaponType", WeaponBehaviorComponent.tpWeaponAnimType);
    2.                     if (CameraControlComponent.allowFirstPerson)
    3.                         fpBodyAnim.SetInteger ("WeaponType", WeaponBehaviorComponent.tpWeaponAnimType);
    4.                     lastWeapon = WeaponBehaviorComponent.weaponNumber;
     
  19. Takahama

    Takahama

    Joined:
    Feb 18, 2014
    Posts:
    166
    There is too much lines including fpBodySkinnedMesh, fpBodyTransform and fpBodyAnim Can you please send me modified version of PlayerCharacter.cs ?
    Thanks
     
  20. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    576
    I wouldn't normally but I know you have bought this asset legit, sent u pm
     
    Takahama likes this.
  21. halo_of_the_sun

    halo_of_the_sun

    Joined:
    Sep 17, 2017
    Posts:
    49
    Is there anything from the Asset Store that would work with RFPS to 'buff up' the AI? I'd like advanced elements like more logical pathfinding / strafing / knockback / taunts and not being able to push them out of the way when sprinting into them.
    Thought I'd ask here first if anyone has combined Assets.
     
  22. Infantry

    Infantry

    Joined:
    Nov 22, 2017
    Posts:
    7
    ***BUMP***

    Hello Sir,

    Awesome mod for Unity BTW just have two issue I need to fix to make my program fully operational.

    1) I work with shooting simulators where players use laser pistols and rifles to shoot at a screen and the hit is detected on the fall of the laser on the screen using a mouse down command.

    Just need to replace the FPS prefab with a OnMouseDown (Right click) per shot with RayCast so when players shoot at the screen the bullets travel to the hit position instead of manually aiming for the character using standard controls. How do I modify the code for this purpose?

    2) I need my character to start with a pistol with unlimited ammunition. How do I modify this script?

    Thank you,
    Brad Crawford
    CEO, The Tactical Experience LLC
    www.tacticalexperience.com
     
  23. thenamesace

    thenamesace

    Joined:
    Jan 25, 2014
    Posts:
    157
    Emerald AI works and is getting better with each update
     
  24. OZAV

    OZAV

    Joined:
    Aug 9, 2013
    Posts:
    198
    ... as ... we progress well with RFPS Zip Line system, right now, ironing out some bugs, causing permanent game pad vibration, and similar ("thou shalt never write 2 time based IEnumerators inside the single Update function"), so is getting fixed, but i have a worse problem now: can anyone provide a few good, (small in size, less-than 250kb) normals image for the rope ... call it ... per say "ropeNormal01_N" etc ...
    "ropeNormal02_N" "ropeNormal03_N" (if you know how much fun this is already on our RFPS end here - you will :). RFPSZipLinebyVranicStudiosCom.JPG RFPS-ZIPLINE-Works-Continued.JPG
     
  25. halo_of_the_sun

    halo_of_the_sun

    Joined:
    Sep 17, 2017
    Posts:
    49
    Thanks for the tip, I'm playing around with it now and it seems pretty good, easy setup for RFPS
     
    thenamesace likes this.
  26. greene_tea92

    greene_tea92

    Joined:
    Jun 26, 2017
    Posts:
    18
    For some reason, the water prefabs won't work. They just sit motionless in the scene. Any help would be greatly appreciated. ;)
     
  27. Emerald_Eel_Entertainment

    Emerald_Eel_Entertainment

    Joined:
    Mar 30, 2016
    Posts:
    120
    This asset hasn't been updated in 6 months and it's worrying me a bit. It's good to see support continued from customers with plenty of experience with the pack but I'm worried the asset might no longer be supported officially.
     
    Xain and greene_tea92 like this.
  28. Arealjighead

    Arealjighead

    Joined:
    Apr 7, 2017
    Posts:
    32
    @greene_tea92 Make sure the water prefab in game isn't missing anything. If it is missing anything make sure when you add it that what you are adding is located in the RFPS folder. I've had problems with my RFPS water trying to pull assets from Standard Assets folder before. If you haven't done much work with your current project, try starting a new one with RFPS the only pack you import. Don't import standard assets & see if that helps
     
    greene_tea92 likes this.
  29. jons190

    jons190

    Joined:
    Sep 13, 2016
    Posts:
    254
    Hey all, I have a question for everyone. I just upgraded the entire harness to Unity 5.6.5f, and the newest RFPS version ( I think 1.47) and am getting some A.I. errors.

    First, I drop in the zombie prefabs and get an error after the models moves and tries to restart walking. I get a dreaded AI error. (on mobile today but can grab some specific screenshots tonight)

    I suspect that this is unity 2017 related. (I have not gone to that version as I hear there are some big bugs but... maybe if I jump up to this version these errors will go away.)


    Also, does anyone have any good tutorials on changing out the NPC characters with the new Mechain animations? I'v tried about six times now based on the documnetation in RFPS and keep messing it up somehow. I tried this YouTube tutorial, but the resolution is so small I can't actually read whats going on.


    Also on a side note: Does anyone know the zombie package animation that are used in this animation? I'd like to snag it in the store if possible.

    Secondly. I'm a programming noob. Can anyone point me to a tutorial on how to do a deep stack trace of the code? Unity keeps telling me I have an ON_mouse event in my code that is dropping performance on mobile (android does not like on_mouse events) and it sometimes spikes my CPU 5%. This is a lot of performance lost on an android device, but I have no idea how to track that down within the code (I suspect it's the rewired plugin code i use for gamepad support on mobile, but I have no idea)

    Thanks all.
     
  30. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,368
    Rewired does not use the MonoBehaviour.OnMouseXXX events anywhere for anything. Not in the DLL's and not in any extra scripts.

    Deep profiling would show you where it is coming from. Enable Deep Profile at the top of the Unity profiler window.
     
  31. SpacemanSam13

    SpacemanSam13

    Joined:
    Dec 22, 2016
    Posts:
    7
    This is excellent! Thank you so much!
     
  32. SpacemanSam13

    SpacemanSam13

    Joined:
    Dec 22, 2016
    Posts:
    7
    Hey again everyone, i had a quick question. Would would i be able to modify the InstantDeathCollider to affect NPCs as well? I have an area on the map that i where if npcs or the player fall off then they die, kind off like a lava pit. I know this is something simple, but so far i haven't been able to figure it out. I've posted the code for the death collider below.

    Also it would seem like as the code is, if a NPC were to hit it it would reset the game. Im not sure if it would, but thats definately not something i'd want to happen. Any help Is appreciated! Thanks!


    Edit; i've posted lines 11 - 30 below

    Code (CSharp):
    1. = "Player"){
    2.             FPSPlayer player = col.GetComponent<FPSPlayer>();
    3.             if(killInvulnerable){
    4.                 player.invulnerable = false;
    5.             }
    6.             player.ApplyDamage(player.maximumHitPoints + 1.0f);
    7.         }else if (col.GetComponent<Rigidbody>()) {  
    8.             col.gameObject.SetActive(false);
    9.         }
    10.          
    11.     }
    12.  
    13.     void Reset (){
    14.         if (GetComponent<Collider>() == null){
    15.             gameObject.AddComponent<BoxCollider>();
    16.             GetComponent<Collider>().isTrigger = true;
    17.         }
    18.     }
    19. }
     
    Last edited: Apr 16, 2018
  33. Takahama

    Takahama

    Joined:
    Feb 18, 2014
    Posts:
    166
    DO NOT SHARE full codes in here!
     
    Last edited: Apr 12, 2018
  34. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,835
    Version 1.45 Release Notes:
    -Removed legacy image effects (except sun shafts) and replaced with Unity Post Processing Stack.


    Why? Why are you still marrying your asset to post effects? Anyone can add post effects on top of this, but you have the code dependent upon them. That's just not good.
     
    JamesArndt and Mark_01 like this.
  35. jons190

    jons190

    Joined:
    Sep 13, 2016
    Posts:
    254
    Excellent. Thanks for the info. BYT I love rewired! I talk in up everywhere I go.
     
    guavaman likes this.
  36. Emerald_Eel_Entertainment

    Emerald_Eel_Entertainment

    Joined:
    Mar 30, 2016
    Posts:
    120
    What bothers me about the RFPSP is that it has a ton of post processing and light shafts which I'm not big on, and when pressing the restart button in play mode the level is reset and the lighting changes, and I don't know how to stop it.
     
    magique likes this.
  37. twangydave

    twangydave

    Joined:
    Mar 30, 2017
    Posts:
    41
    It's all toggle'd through click boxes on the main camera - no need to use it if you have no need for it.
     
  38. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,835
    No need for it to be part of the package at all.
     
  39. Emerald_Eel_Entertainment

    Emerald_Eel_Entertainment

    Joined:
    Mar 30, 2016
    Posts:
    120
    I remember disabling all of the post processing components and the directional light still being changed when hitting restart.
     
  40. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    576
    Remove from 'ReconfigurePrefab.cs', this will setup for using one or two camera setup. Which is probably why they added it, to show how image effects works in 2 cam setup. But there is like 3 lines of code to remove altogether no big deal considering the time ur spent with this asset
     
  41. Emerald_Eel_Entertainment

    Emerald_Eel_Entertainment

    Joined:
    Mar 30, 2016
    Posts:
    120
    I see; thank you. I'll try making a new project and importing the latest version. What lines do I have to remove?
     
  42. Mark_01

    Mark_01

    Joined:
    Mar 31, 2016
    Posts:
    516
    The post processing I do not want either, knowing how to take this out would be good. I don't know
    what lines to take out either.

    I was assuming, once an update comes out for this ? I hope there is an update. I figure in a new update
    they will take out the old post processing.
     
  43. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    Edit ReconfigurePrefab.cs, as @llJIMBOBll wrote. In the Update() method, comment out these three lines (68-70):
    Code (csharp):
    1.             SunShaftsComponent.enabled = false;
    2.             ColorCorrectionCurvesComponent.enabled = false;
    3.             BloomOptimizedComponent.enabled = false;
    and these three lines (95-97):
    Code (csharp):
    1.             SunShaftsComponent.enabled = true;
    2.             ColorCorrectionCurvesComponent.enabled = true;
    3.             BloomOptimizedComponent.enabled = true;
     
  44. Emerald_Eel_Entertainment

    Emerald_Eel_Entertainment

    Joined:
    Mar 30, 2016
    Posts:
    120
    I checked both sets of lines but they are different to what you said. I'm a bit puzzled by this. I checked the whole script but it doesn't mention those lines anywhere.

    upload_2018-4-16_10-16-58.png
     
    Last edited: Apr 16, 2018
    Mark_01 likes this.
  45. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    576
    With the latest update, (I'm not using it but) I think now Azuline has changed to use Post Processing, If you need to remove Post Processing there should be some line with
    Code (CSharp):
    1. using UnityEngine.PostProcessing;
    and
    Code (CSharp):
    1. PostProcessingBehaviour
    Sorry I'm not using new version so not sure which lines they are on. But you can use Ctrl + F in MonoDevelop to search for the lines, in the search add PostProcessingBehaviour;
    Code (CSharp):
    1. using UnityEngine.PostProcessing;
    will be at the top. Hope this helps Jim
     
  46. Emerald_Eel_Entertainment

    Emerald_Eel_Entertainment

    Joined:
    Mar 30, 2016
    Posts:
    120
    Yes I've downloaded the latest version, which is probably why it's different. The main issue for me is the fact that it loads a preconfigured lighting setup which is unlike the setup made for the level.

    Ah. I use Atom as my software for editing code.

    Not related to the configuration but I entered play mode, enabled all the weapons in the pause menu and, while the game was paused, began adjusting where the view model of the shotgun was when being held to best suit my needs. I adjusted the unzoomed positions, thezoomed positions, the roll pitch, yaw etc, and also fired the weapon a few times. I was sure to refill the current ammo capacity via the inspector for the gun's behaviour before exiting play mode and pasting the newly configured values onto its script.

    Upon entering play mode again and enabling weapons the shotgun was the only weapon that didn't fire unless I changed the view to third person, of which would only let me fire the weapon in that mode. The only way I could enable shooting in first person mode was to sprint, stop sprinting and then left-click. Then shooting it works again. Why is this so?
     
  47. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    10,729
    @Emerald_Eel_Entertainment - To turn off postprocessing, in the latest version (1.45, which requires Unity 2017.3.1+) inspect the prefab's Main Camera and Weapon Camera children. Each of these has a Post Processing Behaviour script with a Profile assigned to it. By default, Main Camera's Profile field points to RFPSP - Fog Only. Weapon Camera's Profile points to RFPSP - Main Effects.

    Make a copy of one of these profile files (located in Assets / RFPSP / Image Effects), inspect it, and untick all checkboxes. Then assign it to both Post Processing Behaviour scripts.
     
    Mark_01 likes this.
  48. Emerald_Eel_Entertainment

    Emerald_Eel_Entertainment

    Joined:
    Mar 30, 2016
    Posts:
    120
    I did disable the latest post-processing stacks but I still have the issue of the pre-made lighting being loaded on a restart.
     
  49. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    576
    Do you have a Reflection probe in your scene or is your lighting baked? Not sure about this seems a weird bug. Did you try from a new scene with just the basics you need to run your scene? Maybe save as new scene and remove stuff thats not important for it to work and try
     
  50. Emerald_Eel_Entertainment

    Emerald_Eel_Entertainment

    Joined:
    Mar 30, 2016
    Posts:
    120
    No reflection probes and definitely nothing baked either. The first thing I did was insert the FPS prefab into the heirarchy and made a floor.
     
unityunity