Xenko accesses physical files through virtual file system abstraction. So in order to access the asset database, you first need to mount the physical directory into the virtual file system.
Once that is done you can instanciate a new content manager by providing it a virtual path to the asset database.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Stride.Core.Mathematics; | |
using Stride.Engine; | |
using Stride.Rendering; | |
using Stride.Graphics; | |
using System.IO; | |
namespace InfinityGame | |
{ | |
public class StartScript : SyncScript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Project | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.IO; | |
using Stride.Core; | |
using Stride.Core.Annotations; | |
using Stride.Core.Mathematics; | |
using Stride.Core.Yaml; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<UserControl x:Class="Namespace.StrideView" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:local="clr-namespace:Namespace" | |
mc:Ignorable="d" | |
d:DesignHeight="300" d:DesignWidth="300"> | |
<Grid> | |
<ContentPresenter x:Name="SceneView"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// original from https://forum.unity3d.com/threads/share-volume-fog-shader.147323/ | |
Shader "Effect/SphereFog" { | |
Properties { | |
_FogColor ("Fog Color", Color) = (1,1,1,1) | |
[space] | |
_Density ("Density", Float) = 1 | |
_Power ("Power/gamma", Float) = 4 | |
_Offset ("Offset", Range(-.1,.1)) = -0.003 | |
[space] | |
_NearbyOffset ("Nearby Offset", Float) = -1 |