Reputation: 3
I got the error CS0535
Library\PackageCache\[email protected]\Editor\UniversalRenderPipelineCameraEditor.cs(1049,57): error CS0535: 'UniversalRenderPipelineCameraContextualMenu' does not implement interface member 'IRemoveAdditionalDataContextualMenu.RemoveComponent(Camera, IEnumerable)'
My code is
[ScriptableRenderPipelineExtension(typeof(UniversalRenderPipelineAsset))]
class UniversalRenderPipelineCameraContextualMenu : IRemoveAdditionalDataContextualMenu<Camera>
{
//The call is delayed to the dispatcher to solve conflict with other SRP
public void RemoveComponent(Camera camera)
{
Undo.SetCurrentGroupName("Remove Universal Camera");
var additionalCameraData = camera.GetComponent<UniversalAdditionalCameraData>();
if (additionalCameraData)
{
Undo.DestroyObjectImmediate(additionalCameraData);
}
Undo.DestroyObjectImmediate(camera);
Upvotes: 0
Views: 442
Reputation: 502
You forgot a parameter in your RemoveComponent method. It should be public void RemoveComponent(Camera camera, IEnumerable obj)
or something.
You need to implement all the Interface members from IRemoveAdditionalDataContextualMenu<Camera>
You can try pressing Ctrl
and clicking on IRemoveAdditionalDataContextualMenu
You have to implement every one of the methods you see in that interface.
You have to consider the return type (void
,int
, etc.), the method name and the exact parameters when implementing members.
Do this and your errors will go away.
From Olivier in the comments: Use this tutorial if you are using Visual Studio
Upvotes: 1