XNA Problem Mesh laden
- VB.NET
Sie verwenden einen veralteten Browser (%browser%) mit Sicherheitsschwachstellen und können nicht alle Funktionen dieser Webseite nutzen.
Hier erfahren Sie, wie einfach Sie Ihren Browser aktualisieren können.
Hier erfahren Sie, wie einfach Sie Ihren Browser aktualisieren können.
Es gibt 22 Antworten in diesem Thema. Der letzte Beitrag () ist von creac.
-
-
Normalerweise muss man die Dateiendung weglassen
Skybird schrieb:
Das sind ja Ubisoftmethoden hier !
-
-
-
-
-
Probiers halt aus:
Legs in den Debug Ordner zu der Exe
bei C# gibt es nen "Content" Ordner im Projekt Ordner, wenn man XNA verwendet
Deshalb probier mal einen Ordner mit dem Namen "Content" in den Projekt Ordner zu legen und es da rein zu legen
Ist nur so ne Idee - im Endeffekt hab ich grad k. a. wie das noch ging hab das Xna Framework hier nichtmal installiert
Aber wichtig: Ohne Endung laden ist schon richtig d.h. ohne .fbx -
-
Hast du die Datei überhaupt zum Contentprojekt hinzugefügt?
Skybird schrieb:
Das sind ja Ubisoftmethoden hier !
-
-
-
-
-
-
-
-
Ich denke einfach, dass du die Datei nicht zum Contentprojekt in Visual-Studio hinzugefügt hast. Da kannst du sie noch in tausende Ordner kopieren. Wenn die Datei nicht durch die Content-Pipeline geht, bringts nix. Also Rechtsklick auf das Content-Projekt und dann Hinzufügen->>Vorhandenes Element
Skybird schrieb:
Das sind ja Ubisoftmethoden hier !
-
VB.NET-Quellcode
- Imports System
- Imports System.Collections.Generic
- Imports System.Linq
- Imports Microsoft.Xna.Framework
- Imports Microsoft.Xna.Framework.Audio
- Imports Microsoft.Xna.Framework.Content
- Imports Microsoft.Xna.Framework.GamerServices
- Imports Microsoft.Xna.Framework.Graphics
- Imports Microsoft.Xna.Framework.Input
- Imports Microsoft.Xna.Framework.Media
- Namespace WindowsGame1
- 'This is the main type for your game
- Public Class Game1
- Inherits Microsoft.Xna.Framework.Game
- Dim graphics As GraphicsDeviceManager
- Dim spriteBatch As SpriteBatch
- Public Sub Game1()
- graphics = New GraphicsDeviceManager(Me)
- Content.RootDirectory = "Content"
- End Sub
- 'Allows the game to perform any initialization it needs to before starting to run.
- 'This is where it can query for any required services and load any non-graphic
- 'related content. Calling base.Initialize will enumerate through any components
- 'and initialize them as well.
- Protected Overrides Sub Initialize()
- 'TODO: Add your initialization logic here
- MyBase.Initialize()
- End Sub
- 'LoadContent will be called once per game and is the place to load
- 'all of your content.
- Protected Overrides Sub LoadContent()
- ' Create a new SpriteBatch, which can be used to draw textures.
- spriteBatch = New SpriteBatch(GraphicsDevice)
- 'TODO: use this.Content to load your game content here
- End Sub
- 'UnloadContent will be called once per game and is the place to unload
- 'all content.
- Protected Overrides Sub UnloadContent()
- 'TODO: Unload any non ContentManager content here
- End Sub
- 'Allows the game to run logic such as updating the world,
- 'checking for collisions, gathering input, and playing audio.
- '<param name="gameTime">Provides a snapshot of timing values.</param>
- Protected Overrides Sub Update(ByVal gameTime As Microsoft.Xna.Framework.GameTime)
- 'Allows the game to exit
- If GamePad.GetState(PlayerIndex.One).Buttons.Back = ButtonState.Pressed Then
- Me.Exit()
- End If
- 'TODO: Add your update logic here
- MyBase.Update(gameTime)
- End Sub
- Dim mymodel As Model
- 'This is called when the game should draw itself.
- Protected Overrides Sub Draw(ByVal gameTime As Microsoft.Xna.Framework.GameTime)
- ' For Each a As ModelMesh In mymodel.Meshes
- 'a.Draw()
- ' Next
- Content.RootDirectory = "Content"
- mymodel = Content.Load(Of Model)("Quader")
- MyBase.Draw(gameTime)
- End Sub
- End Class
- End Namespace
-
-
-
Ähnliche Themen
-
Mr. VB 2008 Man - - Multimedia- und Spieleprogrammierung
-
4 Benutzer haben hier geschrieben
- Gast (17)
- vb-checker (4)
- jvbsl (1)
- enba (1)