[Unity&photon&]多个同一系列的组件导入产生的问题已经包含了一个定义


photon truesync、photon unity networking、photon voice、photon chat 导入到同一个工程中,会出现重复的问题

1.

Assets/Photon Unity Networking/Demos/DemoChat/FriendItem.cs(11,14): error CS0101: The namespace `global::' already contains a definition for `FriendItem'

2.

Assets/Photon Unity Networking/UtilityScripts/UI/TextButtonTransition.cs(23,15): error CS0101: The namespace `ExitGames.UtilityScripts' already contains a definition for `TextButtonTransition'

3.

Assets/Photon Unity Networking/UtilityScripts/UI/TextToggleIsOnTransition.cs(23,15): error CS0101: The namespace `ExitGames.UtilityScripts' already contains a definition for `TextToggleIsOnTransition'


4.

Assets/Photon Unity Networking/Editor/PhotonNetwork/AccountService.cs(25,14): error CS0101: The namespace `global::' already contains a definition for `AccountService'


5.

Assets/Demo/kickingheads/scripts/PlayerBehavior.cs(68,18): error CS1061: Type `UnityEngine.Animator' does not contain a definition for `Stop' and no extension method `Stop' of type `UnityEngine.Animator' could be found. Are you missing an assembly reference?


第1个问题

Assets/Photon Unity Networking/Demos/DemoChat/FriendItem.cs(11,14): error CS0101: The namespace `global::' already contains a definition for `FriendItem'

[Unity&photon&]多个同一系列的组件导入产生的问题已经包含了一个定义使用VS进行搜索

[Unity&photon&]多个同一系列的组件导入产生的问题已经包含了一个定义

要么把 Demo Chat 里面的文件夹 删除。

要么 把 DemoChat \ FriendItem.cs 文件删除。

[Unity&photon&]多个同一系列的组件导入产生的问题已经包含了一个定义


第2个问题

Assets/Photon Unity Networking/UtilityScripts/UI/TextButtonTransition.cs(23,15): error CS0101: The namespace `ExitGames.UtilityScripts' already contains a definition for `TextButtonTransition'

[Unity&photon&]多个同一系列的组件导入产生的问题已经包含了一个定义[Unity&photon&]多个同一系列的组件导入产生的问题已经包含了一个定义

找到这2个文件 的位置,删除其中1个文件


第3个问题

Assets/Photon Unity Networking/UtilityScripts/UI/TextToggleIsOnTransition.cs(23,15): error CS0101: The namespace `ExitGames.UtilityScripts' already contains a definition for `TextToggleIsOnTransition'

[Unity&photon&]多个同一系列的组件导入产生的问题已经包含了一个定义

[Unity&photon&]多个同一系列的组件导入产生的问题已经包含了一个定义

找到这2个文件 的位置,删除其中1个文件


第4个问题

Assets/Photon Unity Networking/Editor/PhotonNetwork/AccountService.cs(25,14): error CS0101: The namespace `global::' already contains a definition for `AccountService'
[Unity&photon&]多个同一系列的组件导入产生的问题已经包含了一个定义[Unity&photon&]多个同一系列的组件导入产生的问题已经包含了一个定义

找到这2个文件 的位置,删除其中1个文件



--------------------------------------------------------------------------------------------------------------

第5个问题



Assets/Demo/kickingheads/scripts/PlayerBehavior.cs(68,18): error CS1061: Type `UnityEngine.Animator' does not contain a definition for `Stop' and no extension method `Stop' of type `UnityEngine.Animator' could be found. Are you missing an assembly reference?


https://docs.unity3d.com/ScriptReference/Animator.html



Assets/Demo/kickingheads/scripts/PlayerBehavior.cs(68,18):
68     animator.Stop();//改为


--------------------------------------------------------------------------------------------------------------

Photon TrueSync

[Unity&photon&]多个同一系列的组件导入产生的问题已经包含了一个定义

photon unity networking(PUN)

[Unity&photon&]多个同一系列的组件导入产生的问题已经包含了一个定义

photon chat

[Unity&photon&]多个同一系列的组件导入产生的问题已经包含了一个定义

photon voice

[Unity&photon&]多个同一系列的组件导入产生的问题已经包含了一个定义








Assets/Demo/kickingheads/scripts/PlayerBehavior.cs(68,18): error CS1061: Type `UnityEngine.Animator' does not contain a definition for `Stop' and no extension method `Stop' of type `UnityEngine.Animator' could be found. Are you missing an assembly reference?