How do I delete a file in the project pane?

There is no context menu entry in the project manue pane for deleting files. Is it possible anyway? Deleting it inside Unity seems a good idea because of relations between objects, doesn't it?

Not sure if you're in Mac or Windows - in OSX, you can simply select the file and then press Command-Delete to remove it.

We should add a context menu item for deleting from the projectview.

In the meantime: On Windows: Delete key (or Ctrl+Backspace, IIRC). On Mac OS X: Cmd+Backspace (just like deleting in Finder).

As a sidenote: deleting things from unity is not "better" than deleting from the filesystem. It's a few more clicks, but there is no special tracking unity does when you delete an asset from within Unity.

Perhaps I misunderstand your point Lucas:

"As a sidenote: deleting things from unity is not "better" than deleting from the filesystem. It's a few more clicks, but there is no special tracking unity does when you delete an asset from within Unity." -L. Meijer

But according to here:

Learning the Interface

You should never move (or delete) project assets around using the OS since this will break any metadata associated with the asset. Always use the Project View to organize your assets.

Further, if you do delete items from via this method, you'll be given an warning message in the log window about doing so.

For example:

"Ignoring orphan meta data file Assets/Scenes/NewBehaviourScript.cs.meta. When moving or deleting files outside of Unity, please ensure that the corresponding .meta file is moved along with it."

So, to answer the first question... yes it is not only a good idea but should be standard practice, to do all of your project manipulation from within Unity. However, I do agree with Lucas that there should be a context option to delete an item. In fact it's rather surprising that it isn't there given the importance of deleting from within Unity.

On Windows: Delete key (or Ctrl+Backspace, IIRC).

On Mac OS X: Cmd+Backspace (just like deleting in Finder).

There is also a Delete command in the Edit menu (at least on MacOSX) which also displays the Command-Delete shortcut.