nexal
Full vMember
Posts: 57
|
Post by nexal on Jan 29, 2019 21:40:48 GMT
So you ran the setup example ui menu item and got a null ref? Interesting. You need to completely remove the lobbyui component. I should make a new release with that removed... I will need to play around with this some more to see what's going on. I use Unity 2018.2. I don't know if it's an add on problem or I'm the one who makes some mistakes, but should I replace lobbyUI component with exampleUI from the UI folder in the network manager but not drag&drop? However the video is very clear and congratulations for the work you are doing. <iframe style="position: absolute; width: 12px; height: 4.360000000000014px; z-index: -9999; border-style: none;left: 15px; top: -5px;" id="MoatPxIOPT0_73627399" scrolling="no" width="12" height="4.360000000000014"></iframe> <iframe style="position: absolute; width: 12px; height: 4.36px; z-index: -9999; border-style: none; left: 552px; top: -5px;" id="MoatPxIOPT0_6415341" scrolling="no" width="12" height="4.360000000000014"></iframe> <iframe style="position: absolute; width: 12px; height: 4.36px; z-index: -9999; border-style: none; left: 15px; top: 158px;" id="MoatPxIOPT0_25173054" scrolling="no" width="12" height="4.360000000000014"></iframe> <iframe style="position: absolute; width: 12px; height: 4.36px; z-index: -9999; border-style: none; left: 552px; top: 158px;" id="MoatPxIOPT0_84531074" scrolling="no" width="12" height="4.360000000000014"></iframe>
|
|
|
Post by ibuckly on Jan 30, 2019 0:02:48 GMT
I would just make sure that the gameobject name and the item name match exactly including spaces being sure not to include the leading lower case "v". I would be surprised if it had anything to do with your custom character. Hopefully you figure it out! I figured it out!!! Finaly!! Thank you so much. You're awesome. Hours of work and finaly found it. Only the draw and hide weapon doesn't work. Don't know why, but for now this is working!
|
|
|
Post by ibuckly on Jan 30, 2019 0:05:30 GMT
I have just a small question I guess. How can I make the player animations sync faster and smooth over the scene. Because the other players are shaking on the playerscreen...
|
|
|
Post by wesleywh on Jan 30, 2019 23:29:53 GMT
I have just a small question I guess. How can I make the player animations sync faster and smooth over the scene. Because the other players are shaking on the playerscreen... Have a look at the "PlayerSync" component. I have exposed some variables that you can play around with to solve this. I bet you're refering to the rotation sync speeds. Play around with those variables. You can hover over the variable to get a tooltip description of what each one does.
|
|
|
Post by wesleywh on Jan 30, 2019 23:32:15 GMT
nexal You don't want to use the "PUN_LobbyUI" component at all. Delete it from the entire project. Just run the "Invector > Multiplayer > (Optional) Setup Example UI" menu option. That will do everything for you. If you have already done that there should be a child gameobject of the "Network Manager" gameobject called "Example UI" or something like that. If that isn't there then you haven't run that yet. If it is just delete it and run it again.
|
|
nexal
Full vMember
Posts: 57
|
Post by nexal on Jan 31, 2019 8:54:16 GMT
nexal You don't want to use the "PUN_LobbyUI" component at all. Delete it from the entire project. Just run the "Invector > Multiplayer > (Optional) Setup Example UI" menu option. That will do everything for you. If you have already done that there should be a child gameobject of the "Network Manager" gameobject called "Example UI" or something like that. If that isn't there then you haven't run that yet. If it is just delete it and run it again. It's the first thing I did following the video but selecting from the menu "example UI" as I told you an error is created: NullReferenceException: Object reference not set to an instance of an object. I'm waiting for the new release, I do not want to bother you yet. Thank you
|
|
|
Post by ibuckly on Feb 4, 2019 15:28:44 GMT
**Edit**
Why is it that the aim animation is not the same on the enemies screen. When I pick up an assault rifle, the left Aim is correct but the aim animation not. Has it something to do with the animation sync? I have uploaded an image as you can see. I have no idea what's wrong. And btw I have no idea why the enemy carries 10 weapon clones when the enemy picks up a weapon. interactive dice for whiteboard
|
|
|
Post by wesleywh on Feb 5, 2019 15:21:12 GMT
Not sure on the aim thing right off the bat. It could be with the syncing of the animations. If it's a trigger than that could means the package is missing a trigger to sync. If the aim animation isn't a trigger than all of that logic is located in the Player Sync script located on the root of the player object.
The reason there are a bunch of clones of the weapons is because the create weapon is getting called from multiple sources. This is a bug in the package. This would require to have a deeper understanding of the invector package to remove unneeded calls to duplicate a weapon.
Make a pull request on my github repo with anything you find.
To be honest though it looks like the animation is fine(from the picture) but the weapon placement is your issue. You need to sync the vector3 placement of the weapon relative to the holder object across the network. I dont think that is happening right now.
|
|
|
Post by rasto61 on Feb 5, 2019 20:33:09 GMT
Has anyone noticed that the vItemManagerUtilities sets a new persistant listener to a SetLeftWeapon/SetRightWeapon every time you select the tpc controller? (Or is it just me?) (Fix is to also check for typeof(PUN_ShooterManager) in the relevant places where the listeners are added.) Still getting this. Could you please add the fix to the vItemManagerUtilities and vItemManagerUtilities_Shooter? something along the lines: if (equipPointR.onInstantiateEquiment.GetPersistentTarget(i).GetType().Equals(typeof(PUN_ShooterManager)) && equipPointR.onInstantiateEquiment.GetPersistentMethodName(i).Equals("SetRightWeapon")) { containsListener = true; break; }
|
|
|
Post by ibuckly on Feb 7, 2019 4:59:48 GMT
I see what the problem is for the aiming. The defaulthandler and weapon IK is edited manualy which means that the hands are not at the same position as the aim animation and because the multiplayer script syncs only the aim animation and not the hand bones position, that's why they look different. On the local and multiplayer screen. Is there a way to sync the hand bones also?
As I said, I've played around with the sync script and added the shoulders, upperarms, lowerarms and hands to the script to be synced and it works great. The only thing is that I have to figure out how to smoothen the syncing.
|
|
|
Post by ibuckly on Feb 11, 2019 4:00:21 GMT
As I mentioned in an early comment about the weapon clones. I have found a solution for it. As I said, if the enemy holds a weapon, the weaponholder carries multiple clones of the weapon in the weaponholder object. So I have creates a new C# to prevent that.
insert code here using System.Collections; using System.Collections.Generic; using UnityEngine;
public class PUN_DestroyChild : MonoBehaviour { void Update() { int childs = transform.childCount;
for (int i = childs - 1; i >= 1; i--)
{
GameObject.Destroy(transform.GetChild(i).gameObject);
} } }
Put this script in the weaponholder gameobject and voila, it solved the problem!
|
|
|
Post by wesleywh on Feb 11, 2019 20:27:17 GMT
I'm glad you figured out the bone thing that's great. The second script is fine for a temporary bandaid fix but is not going to be good at scale. The issue there lies deeper in the code with it making too many calls to the pun sync functions found within the sync player component. The problem is only going to get exponentially worse as more players join a room and start interacting with weapons is my guess. That's not going to be a simple fix if it is my guess.
|
|
|
Post by wesleywh on Feb 11, 2019 20:40:03 GMT
rasto61Can you make a pull request in the github repo with those specific changes?
|
|
|
Post by halabi on Feb 16, 2019 19:56:28 GMT
hey all I tried to use the addon but it wouldnt work for some reason even if I do everything in the video.. the problem is that when I press join lobby nothing happn, then when I press leave lobby , the following error shows up ..
PhotonNetwork.CurrentRoom is null. You don't have to call LeaveRoom() when you're not in one. State: JoinedLobby UnityEngine.Debug:LogWarning(Object) Photon.Pun.PhotonNetwork:LeaveRoom(Boolean) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs:1853) PUN_NetworkManager:LeaveRoom() (at Assets/PUNMultiplayerInvectorAddon/PUN_Scripts/PUN_NetworkManager.cs:202) PUN_LobbyUI:OnGUI() (at Assets/PUNMultiplayerInvectorAddon/PUN_Scripts/PUN_LobbyUI.cs:44)
I removed lobby UI, then I tried to setup the example UI from the Invector/multiplayer menu but didnt work. then i tried to add the example UI prefab manually (drag/and drop) but the following error shows up.. Unable to instantiate prefab. Prefab may be broken. UnityEditorInternal.InternalEditorUtility:HierarchyWindowDrag (HierarchyProperty, Boolean, HierarchyDropMode) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
|
|
|
Post by wesleywh on Feb 18, 2019 2:33:17 GMT
When you downloaded this from github did you download the unity package or did you click the download zip from the main page and manually import the files? What version of unity are you running? Based on the error. I would guess you didn't connect your Photon ID in the server setup page of Photon. If you don't know what I am talking about have a look here and read the "Pre-Setup" section: github.com/wesleywh/InvectorPhotonPUNMultiplayerAddonOR
You didn't supply a room name when trying to host.
|
|