Skip to main content

BakeOptions

Struct BakeOptions 

Source
pub struct BakeOptions {
    pub project_root: PathBuf,
    pub out_dir: PathBuf,
    pub name_sanitizer: Option<NameSanitizer>,
    pub on_warn: Option<WarnSink>,
    pub on_progress: Option<ProgressSink>,
    pub verbose_timing: bool,
    pub verbose_collisions: bool,
}
Expand description

Caller-supplied bake configuration.

Built by the consumer’s CLI / library entry point and handed to bake. The library never reads env vars, never resolves the project root for you, and never writes to stderr — every side channel routes through one of the optional sinks below.

Fields§

§project_root: PathBuf

Project root containing Assets/ + ProjectSettings/. Caller resolves this (typically via crate::walk::resolve_project_root) before constructing options.

§out_dir: PathBuf

Directory where asset-db.bin and asset-db.cache.bin are written. Caller composes the convention (e.g. <project>/Library/unity-assetdb/ or a fixture-staging path).

§name_sanitizer: Option<NameSanitizer>

Optional name sanitizer; see NameSanitizer.

§on_warn: Option<WarnSink>

Optional warning sink; see WarnSink. None discards warnings.

§on_progress: Option<ProgressSink>

Optional progress sink; see ProgressSink. None discards the summary line.

§verbose_timing: bool

When true, [on_progress] also receives a per-phase timing line (cache / walk / build / write). Env-var-driven behavior is the consumer’s call.

§verbose_collisions: bool

When true, [on_warn] receives a line for each name-collision rewrite during dedup. Off by default to keep steady-state warm bakes quiet.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.