SO MUCH SCUFFEDNESS
This commit is contained in:
@ -12,6 +12,9 @@ GameObject:
|
||||
- component: {fileID: 4512293259955182956}
|
||||
- component: {fileID: 6667641716399555817}
|
||||
- component: {fileID: -5271135124957689192}
|
||||
- component: {fileID: 247864930697348647}
|
||||
- component: {fileID: 526411540949090343}
|
||||
- component: {fileID: 6088059624252575348}
|
||||
m_Layer: 0
|
||||
m_Name: NetworkLOD_Prefab
|
||||
m_TagString: Untagged
|
||||
@ -29,6 +32,7 @@ Transform:
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 3106622367778460228}
|
||||
m_Father: {fileID: 0}
|
||||
@ -46,6 +50,19 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 26b716c41e9b56b4baafaf13a523ba2e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
<IsNested>k__BackingField: 0
|
||||
<ComponentIndex>k__BackingField: 0
|
||||
<PredictedSpawn>k__BackingField: {fileID: 0}
|
||||
_networkBehaviours:
|
||||
- {fileID: 6667641716399555817}
|
||||
- {fileID: -5271135124957689192}
|
||||
- {fileID: 526411540949090343}
|
||||
<ParentNetworkObject>k__BackingField: {fileID: 0}
|
||||
<ChildNetworkObjects>k__BackingField: []
|
||||
_isNetworked: 1
|
||||
_isGlobal: 0
|
||||
_initializeOrder: 0
|
||||
_defaultDespawnType: 0
|
||||
NetworkObserver: {fileID: 0}
|
||||
<PrefabId>k__BackingField: 2
|
||||
<SpawnableCollectionId>k__BackingField: 0
|
||||
@ -54,18 +71,6 @@ MonoBehaviour:
|
||||
<AssetPathHash>k__BackingField: 8082309187455287958
|
||||
_sceneNetworkObjects:
|
||||
- {fileID: 4512293259955182956}
|
||||
<IsNested>k__BackingField: 0
|
||||
<ComponentIndex>k__BackingField: 0
|
||||
<PredictedSpawn>k__BackingField: {fileID: 0}
|
||||
_networkBehaviours:
|
||||
- {fileID: 6667641716399555817}
|
||||
- {fileID: -5271135124957689192}
|
||||
<ParentNetworkObject>k__BackingField: {fileID: 0}
|
||||
<ChildNetworkObjects>k__BackingField: []
|
||||
_isNetworked: 1
|
||||
_isGlobal: 0
|
||||
_initializeOrder: 0
|
||||
_defaultDespawnType: 0
|
||||
--- !u!114 &6667641716399555817
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -73,7 +78,7 @@ MonoBehaviour:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4512293259955182959}
|
||||
m_Enabled: 1
|
||||
m_Enabled: 0
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9880e85651efd71469092ce519317f7b, type: 3}
|
||||
m_Name:
|
||||
@ -97,6 +102,7 @@ MonoBehaviour:
|
||||
_componentIndexCache: 1
|
||||
_addedNetworkObject: {fileID: 4512293259955182956}
|
||||
_networkObjectCache: {fileID: 4512293259955182956}
|
||||
_componentConfiguration: 0
|
||||
_synchronizeParent: 0
|
||||
_packing:
|
||||
Position: 1
|
||||
@ -123,6 +129,88 @@ MonoBehaviour:
|
||||
X: 0
|
||||
Y: 0
|
||||
Z: 0
|
||||
--- !u!143 &247864930697348647
|
||||
CharacterController:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4512293259955182959}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Height: 2
|
||||
m_Radius: 0.5
|
||||
m_SlopeLimit: 45
|
||||
m_StepOffset: 0.3
|
||||
m_SkinWidth: 0.08
|
||||
m_MinMoveDistance: 0.001
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &526411540949090343
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4512293259955182959}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a31284a274f3c3c4993d760abda8520a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_componentIndexCache: 2
|
||||
_addedNetworkObject: {fileID: 4512293259955182956}
|
||||
_networkObjectCache: {fileID: 4512293259955182956}
|
||||
jumpSpeed: 6
|
||||
speed: 8
|
||||
gravity: 0
|
||||
--- !u!114 &6088059624252575348
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4512293259955182959}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 62899f850307741f2a39c98a8b639597, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Actions: {fileID: -944628639613478452, guid: c206aa4192994a34a8f932eb995f13b9, type: 3}
|
||||
m_NotificationBehavior: 2
|
||||
m_UIInputModule: {fileID: 0}
|
||||
m_DeviceLostEvent:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_DeviceRegainedEvent:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ControlsChangedEvent:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionEvents:
|
||||
- m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 526411540949090343}
|
||||
m_TargetAssemblyTypeName: PlayerInputDriver, mydef
|
||||
m_MethodName: OnMovement
|
||||
m_Mode: 0
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
m_ActionId: 55dfdeea-331d-47f2-9a02-526e458aa5ed
|
||||
m_ActionName: New action map/New action[/Keyboard/w,/Keyboard/s,/Keyboard/a,/Keyboard/d]
|
||||
m_NeverAutoSwitchControlSchemes: 0
|
||||
m_DefaultControlScheme:
|
||||
m_DefaultActionMap: New action map
|
||||
m_SplitScreenIndex: -1
|
||||
m_Camera: {fileID: 0}
|
||||
--- !u!1 &7544314590428355348
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -152,6 +240,7 @@ Transform:
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4512293259955182957}
|
||||
m_RootOrder: 0
|
||||
@ -175,14 +264,16 @@ MeshRenderer:
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 2100000, guid: 138cca86153614c4c8e24fc2768fba69, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
@ -203,6 +294,7 @@ MeshRenderer:
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!135 &6944568664394371648
|
||||
SphereCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
|
196
Assets/FishNet/Demos/Network LOD/Prefabs/New Controls.cs
Normal file
196
Assets/FishNet/Demos/Network LOD/Prefabs/New Controls.cs
Normal file
@ -0,0 +1,196 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
|
||||
// version 1.4.4
|
||||
// from Assets/FishNet/Demos/Network LOD/Prefabs/New Controls.inputactions
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.InputSystem.Utilities;
|
||||
|
||||
public partial class @NewControls : IInputActionCollection2, IDisposable
|
||||
{
|
||||
public InputActionAsset asset { get; }
|
||||
public @NewControls()
|
||||
{
|
||||
asset = InputActionAsset.FromJson(@"{
|
||||
""name"": ""New Controls"",
|
||||
""maps"": [
|
||||
{
|
||||
""name"": ""New action map"",
|
||||
""id"": ""d0f51457-a857-4fa4-98ce-e5cde69f5bba"",
|
||||
""actions"": [
|
||||
{
|
||||
""name"": ""New action"",
|
||||
""type"": ""Value"",
|
||||
""id"": ""55dfdeea-331d-47f2-9a02-526e458aa5ed"",
|
||||
""expectedControlType"": ""Vector2"",
|
||||
""processors"": """",
|
||||
""interactions"": ""Hold"",
|
||||
""initialStateCheck"": true
|
||||
}
|
||||
],
|
||||
""bindings"": [
|
||||
{
|
||||
""name"": ""2D Vector"",
|
||||
""id"": ""ab43b81b-3869-467f-9684-e4f7a35d6c73"",
|
||||
""path"": ""2DVector"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": """",
|
||||
""action"": ""New action"",
|
||||
""isComposite"": true,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": ""up"",
|
||||
""id"": ""24cc63fc-7927-464b-acce-ad9f5d5de163"",
|
||||
""path"": ""<Keyboard>/w"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": """",
|
||||
""action"": ""New action"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": true
|
||||
},
|
||||
{
|
||||
""name"": ""down"",
|
||||
""id"": ""6fbbe716-aa97-412a-85c5-9597c0fea21c"",
|
||||
""path"": ""<Keyboard>/s"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": """",
|
||||
""action"": ""New action"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": true
|
||||
},
|
||||
{
|
||||
""name"": ""left"",
|
||||
""id"": ""3da6b6cd-13d7-4bd9-b943-010ef1aafb06"",
|
||||
""path"": ""<Keyboard>/a"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": """",
|
||||
""action"": ""New action"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": true
|
||||
},
|
||||
{
|
||||
""name"": ""right"",
|
||||
""id"": ""5dd39ce5-66ed-442e-af87-f9b09cb1b971"",
|
||||
""path"": ""<Keyboard>/d"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": """",
|
||||
""action"": ""New action"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": true
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
""controlSchemes"": []
|
||||
}");
|
||||
// New action map
|
||||
m_Newactionmap = asset.FindActionMap("New action map", throwIfNotFound: true);
|
||||
m_Newactionmap_Newaction = m_Newactionmap.FindAction("New action", throwIfNotFound: true);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
UnityEngine.Object.Destroy(asset);
|
||||
}
|
||||
|
||||
public InputBinding? bindingMask
|
||||
{
|
||||
get => asset.bindingMask;
|
||||
set => asset.bindingMask = value;
|
||||
}
|
||||
|
||||
public ReadOnlyArray<InputDevice>? devices
|
||||
{
|
||||
get => asset.devices;
|
||||
set => asset.devices = value;
|
||||
}
|
||||
|
||||
public ReadOnlyArray<InputControlScheme> controlSchemes => asset.controlSchemes;
|
||||
|
||||
public bool Contains(InputAction action)
|
||||
{
|
||||
return asset.Contains(action);
|
||||
}
|
||||
|
||||
public IEnumerator<InputAction> GetEnumerator()
|
||||
{
|
||||
return asset.GetEnumerator();
|
||||
}
|
||||
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return GetEnumerator();
|
||||
}
|
||||
|
||||
public void Enable()
|
||||
{
|
||||
asset.Enable();
|
||||
}
|
||||
|
||||
public void Disable()
|
||||
{
|
||||
asset.Disable();
|
||||
}
|
||||
public IEnumerable<InputBinding> bindings => asset.bindings;
|
||||
|
||||
public InputAction FindAction(string actionNameOrId, bool throwIfNotFound = false)
|
||||
{
|
||||
return asset.FindAction(actionNameOrId, throwIfNotFound);
|
||||
}
|
||||
public int FindBinding(InputBinding bindingMask, out InputAction action)
|
||||
{
|
||||
return asset.FindBinding(bindingMask, out action);
|
||||
}
|
||||
|
||||
// New action map
|
||||
private readonly InputActionMap m_Newactionmap;
|
||||
private INewactionmapActions m_NewactionmapActionsCallbackInterface;
|
||||
private readonly InputAction m_Newactionmap_Newaction;
|
||||
public struct NewactionmapActions
|
||||
{
|
||||
private @NewControls m_Wrapper;
|
||||
public NewactionmapActions(@NewControls wrapper) { m_Wrapper = wrapper; }
|
||||
public InputAction @Newaction => m_Wrapper.m_Newactionmap_Newaction;
|
||||
public InputActionMap Get() { return m_Wrapper.m_Newactionmap; }
|
||||
public void Enable() { Get().Enable(); }
|
||||
public void Disable() { Get().Disable(); }
|
||||
public bool enabled => Get().enabled;
|
||||
public static implicit operator InputActionMap(NewactionmapActions set) { return set.Get(); }
|
||||
public void SetCallbacks(INewactionmapActions instance)
|
||||
{
|
||||
if (m_Wrapper.m_NewactionmapActionsCallbackInterface != null)
|
||||
{
|
||||
@Newaction.started -= m_Wrapper.m_NewactionmapActionsCallbackInterface.OnNewaction;
|
||||
@Newaction.performed -= m_Wrapper.m_NewactionmapActionsCallbackInterface.OnNewaction;
|
||||
@Newaction.canceled -= m_Wrapper.m_NewactionmapActionsCallbackInterface.OnNewaction;
|
||||
}
|
||||
m_Wrapper.m_NewactionmapActionsCallbackInterface = instance;
|
||||
if (instance != null)
|
||||
{
|
||||
@Newaction.started += instance.OnNewaction;
|
||||
@Newaction.performed += instance.OnNewaction;
|
||||
@Newaction.canceled += instance.OnNewaction;
|
||||
}
|
||||
}
|
||||
}
|
||||
public NewactionmapActions @Newactionmap => new NewactionmapActions(this);
|
||||
public interface INewactionmapActions
|
||||
{
|
||||
void OnNewaction(InputAction.CallbackContext context);
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d8c332b454deffe49b61a9c793d281f6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,78 @@
|
||||
{
|
||||
"name": "New Controls",
|
||||
"maps": [
|
||||
{
|
||||
"name": "New action map",
|
||||
"id": "d0f51457-a857-4fa4-98ce-e5cde69f5bba",
|
||||
"actions": [
|
||||
{
|
||||
"name": "New action",
|
||||
"type": "Value",
|
||||
"id": "55dfdeea-331d-47f2-9a02-526e458aa5ed",
|
||||
"expectedControlType": "Vector2",
|
||||
"processors": "",
|
||||
"interactions": "Hold",
|
||||
"initialStateCheck": true
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
{
|
||||
"name": "2D Vector",
|
||||
"id": "ab43b81b-3869-467f-9684-e4f7a35d6c73",
|
||||
"path": "2DVector",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "New action",
|
||||
"isComposite": true,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "up",
|
||||
"id": "24cc63fc-7927-464b-acce-ad9f5d5de163",
|
||||
"path": "<Keyboard>/w",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "New action",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "down",
|
||||
"id": "6fbbe716-aa97-412a-85c5-9597c0fea21c",
|
||||
"path": "<Keyboard>/s",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "New action",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "left",
|
||||
"id": "3da6b6cd-13d7-4bd9-b943-010ef1aafb06",
|
||||
"path": "<Keyboard>/a",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "New action",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
},
|
||||
{
|
||||
"name": "right",
|
||||
"id": "5dd39ce5-66ed-442e-af87-f9b09cb1b971",
|
||||
"path": "<Keyboard>/d",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "New action",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": true
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"controlSchemes": []
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c206aa4192994a34a8f932eb995f13b9
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3}
|
||||
generateWrapperCode: 1
|
||||
wrapperCodePath:
|
||||
wrapperClassName:
|
||||
wrapperCodeNamespace:
|
@ -0,0 +1,60 @@
|
||||
using FishNet.Object;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
[RequireComponent(typeof(CharacterController))]
|
||||
[RequireComponent(typeof(PlayerInput))]
|
||||
public class PlayerInputDriver : NetworkBehaviour
|
||||
{
|
||||
private CharacterController _characterController;
|
||||
private Vector2 _moveInput;
|
||||
private Vector3 _moveDirection;
|
||||
private bool _jump;
|
||||
[SerializeField] public float jumpSpeed = 6f;
|
||||
[SerializeField] public float speed = 8f;
|
||||
[SerializeField] public float gravity = -9.8f;
|
||||
private void Start()
|
||||
{
|
||||
_characterController = GetComponent(typeof(CharacterController)) as CharacterController;
|
||||
_jump = false;
|
||||
}
|
||||
private void Update()
|
||||
{
|
||||
if (!base.IsOwner)
|
||||
return;
|
||||
if (_characterController.isGrounded||true)
|
||||
{
|
||||
_moveDirection = new Vector3(_moveInput.x, 0.0f, _moveInput.y);
|
||||
_moveDirection *= speed;
|
||||
|
||||
if (_jump)
|
||||
{
|
||||
_moveDirection.y = jumpSpeed;
|
||||
_jump = false;
|
||||
}
|
||||
}
|
||||
_moveDirection.y += gravity * Time.deltaTime;
|
||||
_characterController.Move(_moveDirection * Time.deltaTime);
|
||||
}
|
||||
#region UnityEventCallbacks
|
||||
public void OnMovement(InputAction.CallbackContext context)
|
||||
{
|
||||
if (!base.IsOwner)
|
||||
return;
|
||||
_moveInput = context.ReadValue<Vector2>();
|
||||
}
|
||||
public void OnJump(InputAction.CallbackContext context)
|
||||
{
|
||||
if (!base.IsOwner)
|
||||
return;
|
||||
if (context.started || context.performed)
|
||||
{
|
||||
_jump = true;
|
||||
}
|
||||
else if (context.canceled)
|
||||
{
|
||||
_jump = false;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a31284a274f3c3c4993d760abda8520a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
17
Assets/FishNet/Demos/Network LOD/Prefabs/mydef.asmdef
Normal file
17
Assets/FishNet/Demos/Network LOD/Prefabs/mydef.asmdef
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "mydef",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:75469ad4d38634e559750d17036d5f7c",
|
||||
"GUID:7c88a4a7926ee5145ad2dfa06f454c67"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: df3b7b8b65e22ea4487176804c62c5f0
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -239,6 +239,7 @@ MonoBehaviour:
|
||||
<SceneId>k__BackingField: 10134845970961547977
|
||||
<AssetPathHash>k__BackingField: 0
|
||||
_sceneNetworkObjects:
|
||||
- {fileID: 0}
|
||||
- {fileID: 442045876}
|
||||
--- !u!114 &442045877
|
||||
MonoBehaviour:
|
||||
@ -1351,7 +1352,7 @@ MonoBehaviour:
|
||||
_serverBindAddress:
|
||||
_port: 27015
|
||||
_maximumClients: 16
|
||||
_clientAddress:
|
||||
_clientAddress: 76561199343328028
|
||||
_timeout: 25
|
||||
--- !u!114 &7443408886575219565
|
||||
MonoBehaviour:
|
||||
|
@ -23,14 +23,27 @@ namespace FishNet.Demo.NetworkLod
|
||||
{
|
||||
//Client should not move these.
|
||||
if (base.IsClientOnly)
|
||||
{
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//Server shouldn't move client one.
|
||||
if (base.Owner.IsValid)
|
||||
return;
|
||||
if (base.IsOwner)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
transform.position = Vector3.MoveTowards(transform.position, _goal, _moveRate * Time.deltaTime);
|
||||
if (transform.position == _goal)
|
||||
RandomizeGoal();
|
||||
///transform.position = Vector3.MoveTowards(transform.position, _goal, _moveRate * Time.deltaTime);
|
||||
//if (transform.position == _goal)
|
||||
// RandomizeGoal();
|
||||
}
|
||||
|
||||
public override void OnStartNetwork()
|
||||
|
@ -26,7 +26,7 @@ RenderSettings:
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_SkyboxMaterial: {fileID: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
@ -38,12 +38,12 @@ RenderSettings:
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.37311953, g: 0.38074014, b: 0.3587274, a: 1}
|
||||
m_IndirectSpecularColor: {r: 262.3369, g: 325.0498, b: 430.21924, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 11
|
||||
serializedVersion: 12
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
@ -98,7 +98,7 @@ LightmapSettings:
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_UseShadowmask: 1
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
@ -118,6 +118,8 @@ NavMeshSettings:
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
@ -151,6 +153,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_SendPointerHoverToParent: 1
|
||||
m_HorizontalAxis: Horizontal
|
||||
m_VerticalAxis: Vertical
|
||||
m_SubmitButton: Submit
|
||||
@ -183,6 +186,7 @@ Transform:
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
@ -194,118 +198,95 @@ PrefabInstance:
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0,
|
||||
type: 3}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0,
|
||||
type: 3}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0, type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0,
|
||||
type: 3}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0,
|
||||
type: 3}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0,
|
||||
type: 3}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0,
|
||||
type: 3}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0,
|
||||
type: 3}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0,
|
||||
type: 3}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0,
|
||||
type: 3}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0,
|
||||
type: 3}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0,
|
||||
type: 3}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0,
|
||||
type: 3}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0,
|
||||
type: 3}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0,
|
||||
type: 3}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0,
|
||||
type: 3}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0,
|
||||
type: 3}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0,
|
||||
type: 3}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0,
|
||||
type: 3}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0,
|
||||
type: 3}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0,
|
||||
type: 3}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0,
|
||||
type: 3}
|
||||
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4393252310969058994, guid: 0570b6f7f713dc44a90463654bbcd8d0,
|
||||
type: 3}
|
||||
- target: {fileID: 4393252310969058994, guid: 0570b6f7f713dc44a90463654bbcd8d0, type: 3}
|
||||
propertyPath: _autoStartType
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4393252310969058995, guid: 0570b6f7f713dc44a90463654bbcd8d0,
|
||||
type: 3}
|
||||
- target: {fileID: 4393252310969058995, guid: 0570b6f7f713dc44a90463654bbcd8d0, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: NetworkHudCanvas
|
||||
objectReference: {fileID: 0}
|
||||
@ -323,6 +304,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 226e4eaf2fa685f48bdc3dfaa87c1453, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_allowHostAuthentication: 0
|
||||
_password: HelloWorld
|
||||
--- !u!4 &7443408886491481969
|
||||
Transform:
|
||||
@ -334,6 +316,7 @@ Transform:
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
@ -350,11 +333,13 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: d2c95dfde7d73b54dbbdc23155d35d36, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_logging: {fileID: 0}
|
||||
_spawnablePrefabs: {fileID: 11400000, guid: ec64eb18c93ab344892891f33edbf82a, type: 2}
|
||||
_refreshDefaultPrefabs: 0
|
||||
_runInBackground: 1
|
||||
_dontDestroyOnLoad: 1
|
||||
_objectPool: {fileID: 0}
|
||||
_persistence: 0
|
||||
_logging: {fileID: 0}
|
||||
_spawnablePrefabs: {fileID: 11400000, guid: e6b71f999cc8fc647a3f73f7088802e0, type: 2}
|
||||
--- !u!1 &7443408886491481971
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
Reference in New Issue
Block a user