Skip to content

Commit

Permalink
Version 0.10.0 Alpha.1 [Prerelease]
Browse files Browse the repository at this point in the history
Warning: This commit hash may not be preserved!

Debug state: Some collider pairs may explode on contact due to improper contact generation when using UnitySim. There is a known issue with the generation of the inertia tensor for compound colliders with extreme scale values.
  • Loading branch information
Dreaming381 committed Mar 30, 2024
1 parent b37745b commit 82e4e51
Show file tree
Hide file tree
Showing 128 changed files with 8,424 additions and 4,818 deletions.
12 changes: 12 additions & 0 deletions Calligraphics/Systems/GenerateGlyphsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public partial struct GenerateGlyphsSystem : ISystem
EntityQuery m_singleFontQuery;
EntityQuery m_multiFontQuery;

bool m_skipChangeFilter;

[BurstCompile]
public void OnCreate(ref SystemState state)
{
Expand All @@ -31,6 +33,7 @@ public void OnCreate(ref SystemState state)
.With<TextBaseConfiguration>(true)
.With<TextRenderControl>( false)
.Build();
m_skipChangeFilter = (state.WorldUnmanaged.Flags & WorldFlags.Editor) == WorldFlags.Editor;
}

[BurstCompile]
Expand All @@ -45,6 +48,7 @@ public void OnUpdate(ref SystemState state)
renderGlyphHandle = GetBufferTypeHandle<RenderGlyph>(false),
textBaseConfigurationHandle = GetComponentTypeHandle<TextBaseConfiguration>(true),
textRenderControlHandle = GetComponentTypeHandle<TextRenderControl>(false),
lastSystemVersion = m_skipChangeFilter ? 0 : state.LastSystemVersion
}.ScheduleParallel(m_singleFontQuery, state.Dependency);
}

Expand All @@ -60,6 +64,8 @@ public partial struct Job : IJobChunk
[ReadOnly] public ComponentTypeHandle<TextBaseConfiguration> textBaseConfigurationHandle;
[ReadOnly] public ComponentTypeHandle<FontBlobReference> fontBlobReferenceHandle;

public uint lastSystemVersion;

[NativeDisableContainerSafetyRestriction]
private NativeList<RichTextTag> m_richTextTags;

Expand All @@ -68,6 +74,12 @@ public partial struct Job : IJobChunk
[BurstCompile]
public void Execute(in ArchetypeChunk chunk, int unfilteredChunkIndex, bool useEnabledMask, in v128 chunkEnabledMask)
{
if (!(chunk.DidChange(ref glyphMappingMaskHandle, lastSystemVersion) ||
chunk.DidChange(ref calliByteHandle, lastSystemVersion) ||
chunk.DidChange(ref textBaseConfigurationHandle, lastSystemVersion) ||
chunk.DidChange(ref fontBlobReferenceHandle, lastSystemVersion)))
return;

var calliBytesBuffers = chunk.GetBufferAccessor(ref calliByteHandle);
var renderGlyphBuffers = chunk.GetBufferAccessor(ref renderGlyphHandle);
var glyphMappingBuffers = chunk.GetBufferAccessor(ref glyphMappingElementHandle);
Expand Down
2 changes: 1 addition & 1 deletion Core/Authoring/ObjectAuthoringExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace Latios.Authoring
{
public static class ObjectAuthoringExtensions
{
public static void DestroyDuringConversion(this Object unityEngineObject)
public static void DestroySafelyFromAnywhere(this Object unityEngineObject)
{
#if UNITY_EDITOR
if (Application.isPlaying)
Expand Down
20 changes: 20 additions & 0 deletions Core/Authoring/SubsceneLoadOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace Latios
{
[DisallowMultipleComponent]
[AddComponentMenu("Latios/Scene Management/Subscene Load Options")]
public class SubsceneLoadOptions : MonoBehaviour
{
public enum LoadOptions
{
Synchronous,
Asynchronous
}

public LoadOptions loadOptions;
}
}

11 changes: 11 additions & 0 deletions Core/Authoring/SubsceneLoadOptions.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Core/Components/SceneComponents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,10 @@ public struct CurrentScene : IComponentData
public FixedString128Bytes previous => previousScene;
public bool isFirstFrame => isSceneFirstFrame;
}

/// <summary>
/// Add this component to the subscene entity to disable forcing the subscene to load synchronously.
/// </summary>
public struct DisableSynchronousSubsceneLoadingTag : IComponentData { }
}

8 changes: 8 additions & 0 deletions Core/Containers/Collections.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 82e4e51

Please sign in to comment.